pub struct OwnedList<T> { /* private fields */ }Expand description
A list of owned items without ids (menu items, bindings): order kept, removable by owner.
Implementations§
Source§impl<T> OwnedList<T>
impl<T> OwnedList<T>
pub fn new() -> Self
pub fn push(&mut self, owner: &OwnerId, item: T) -> u64
pub fn iter(&self) -> impl Iterator<Item = &Slot<T>>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Slot<T>>
pub fn retain(&mut self, f: impl FnMut(&Slot<T>) -> bool)
Sourcepub fn remove_owner(&mut self, owner: &OwnerId) -> usize
pub fn remove_owner(&mut self, owner: &OwnerId) -> usize
Removes an owner’s items; returns how many.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for OwnedList<T>
impl<T> RefUnwindSafe for OwnedList<T>where
T: RefUnwindSafe,
impl<T> Send for OwnedList<T>where
T: Send,
impl<T> Sync for OwnedList<T>where
T: Sync,
impl<T> Unpin for OwnedList<T>where
T: Unpin,
impl<T> UnsafeUnpin for OwnedList<T>
impl<T> UnwindSafe for OwnedList<T>where
T: UnwindSafe,
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