Struct Face
pub struct Face<'a> {
pub name: &'a str,
pub identity: &'a str,
pub colour: AlphaColor<Srgb>,
pub is_agent: bool,
pub dimmed: bool,
pub in_call: Option<f32>,
pub scale: f64,
}Expand description
One person’s face in a stack.
Fields§
§name: &'a str§identity: &'a strTheir stable id: picks their picture and, without a colour, their hue.
colour: AlphaColor<Srgb>§is_agent: bool§dimmed: boolIdle or away: the face dims.
in_call: Option<f32>In a voice channel: a soft ring breathes around the face, at this
level (ui::motion::Breathe); None when not in a call.
scale: f64A wave’s bounce, as a scale (1 at rest; ui::motion::Attention).
Implementations§
§impl Face<'_>
impl Face<'_>
pub const GROUND_GAP: f64 = GAP
pub const GROUND_GAP: f64 = GAP
The gap of ground between a face’s disc and its colour ring.
pub const REACH: f64
pub const REACH: f64
How far a face’s ground reaches past its disc: the gap, the colour ring and the gap around it (the call ring, when shown, reaches further).
pub fn disc_in(outer: Rect) -> Rect
pub fn disc_in(outer: Rect) -> Rect
The disc of a face whose ring and gap fill outer exactly: where a
caller with a fixed cell (a column at a screen edge, a list row)
paints Self::paint so nothing reaches past the cell.
pub fn paint(
&self,
ctx: &mut PaintCtx<'_>,
rect: Rect,
ground: AlphaColor<Srgb>,
)
pub fn paint( &self, ctx: &mut PaintCtx<'_>, rect: Rect, ground: AlphaColor<Srgb>, )
Paint this face alone in rect over ground: the call ring, the
ground gap, the colour ring and the face itself, quietened while idle.
Where a caller lays faces out itself (a column at a screen edge, a
list row), so a person still looks as they do in every stack.
Trait Implementations§
impl<'a> StructuralPartialEq for Face<'a>
Auto Trait Implementations§
impl<'a> Freeze for Face<'a>
impl<'a> RefUnwindSafe for Face<'a>
impl<'a> Send for Face<'a>
impl<'a> Sync for Face<'a>
impl<'a> Unpin for Face<'a>
impl<'a> UnsafeUnpin for Face<'a>
impl<'a> UnwindSafe for Face<'a>
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more