pub struct AvatarCatalog { /* private fields */ }Expand description
The per-game wardrobe: the parts available to choose from.
Implementations§
Source§impl AvatarCatalog
impl AvatarCatalog
pub fn new() -> Self
pub fn add(&mut self, part: AvatarPart)
Sourcepub fn get(&self, id: StructuredId) -> Option<&AvatarPart>
pub fn get(&self, id: StructuredId) -> Option<&AvatarPart>
Look up a part by its structured id.
Sourcepub fn parts_for_slot(
&self,
slot: AvatarSlot,
) -> impl Iterator<Item = &AvatarPart>
pub fn parts_for_slot( &self, slot: AvatarSlot, ) -> impl Iterator<Item = &AvatarPart>
All parts that can go in slot (for a customizer menu).
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for AvatarCatalog
impl Clone for AvatarCatalog
Source§impl Debug for AvatarCatalog
impl Debug for AvatarCatalog
Auto Trait Implementations§
impl Freeze for AvatarCatalog
impl RefUnwindSafe for AvatarCatalog
impl Send for AvatarCatalog
impl Sync for AvatarCatalog
impl Unpin for AvatarCatalog
impl UnsafeUnpin for AvatarCatalog
impl UnwindSafe for AvatarCatalog
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