pub trait AvatarModifiers: Sized {
// Required method
fn variant<U>(self, variant: impl Res<U> + 'static) -> Self
where U: Into<AvatarVariant> + Clone + PartialEq + 'static;
// Provided method
fn badge<F>(self, content: F) -> Self
where F: FnOnce(&mut Context) -> Handle<'_, Badge> { ... }
}Expand description
Modifiers for changing the appearance and content of an Avatar.
Required Methods§
Sourcefn variant<U>(self, variant: impl Res<U> + 'static) -> Self
fn variant<U>(self, variant: impl Res<U> + 'static) -> Self
Selects the geometric variant of the Avatar. Accepts a value or signal of type AvatarVariant.
Avatar::new(cx, |cx|{
Svg::new(cx, ICON_USER);
})
.variant(AvatarVariant::Rounded);Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.