pub struct Avatar { /* private fields */ }Expand description
Avatar component for displaying user images or initials
Styled like shadcn/ui Avatar with a simple fallback showing initials.
§Example
use armas_basic::Avatar;
// Simple avatar with initials
Avatar::new("JD").show(ui);
// Larger avatar
Avatar::new("AM").size(48.0).show(ui);Implementations§
Source§impl Avatar
impl Avatar
Sourcepub const fn size_preset(self, size: AvatarSize) -> Self
pub const fn size_preset(self, size: AvatarSize) -> Self
Set the avatar size using a preset
Sourcepub const fn shape(self, shape: AvatarShape) -> Self
pub const fn shape(self, shape: AvatarShape) -> Self
Set the avatar shape
Auto Trait Implementations§
impl Freeze for Avatar
impl RefUnwindSafe for Avatar
impl Send for Avatar
impl Sync for Avatar
impl Unpin for Avatar
impl UnsafeUnpin for Avatar
impl UnwindSafe for Avatar
Blanket Implementations§
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
Mutably borrows from an owned value. Read more