pub struct PooledInlineList<T: ?Sized> { /* private fields */ }Expand description
A list of shared items that holds one item in place and more in a list.
Items are compared by reference, as in the original, whose items are
reference types. The original rents the array of the list from the shared
array pool; here the list owns a Vec.
Implementations§
Source§impl<T: ?Sized> PooledInlineList<T>
impl<T: ?Sized> PooledInlineList<T>
pub fn new() -> Self
Sourcepub fn from_raw_state(raw_state: PooledInlineListRawState<T>) -> Self
pub fn from_raw_state(raw_state: PooledInlineListRawState<T>) -> Self
For compositor serialization purposes only, takes the ownership of previously transferred state
pub fn add(&mut self, item: Rc<T>)
Sourcepub fn remove(&mut self, item: &Rc<T>) -> bool
pub fn remove(&mut self, item: &Rc<T>) -> bool
Removes the item when it is the one the list holds in place.
As in the original, which tests the argument rather than its own state for being a list, an item of a list of several is not removed.
pub fn ensure_capacity(&mut self, count: i32)
pub fn dispose(&mut self)
pub fn count(&self) -> i32
pub fn get_enumerator(&self) -> PooledInlineListEnumerator<'_, T> ⓘ
Sourcepub fn transfer_raw_state(&mut self) -> PooledInlineListRawState<T>
pub fn transfer_raw_state(&mut self) -> PooledInlineListRawState<T>
For compositor serialization purposes only, gives up the ownership of the internal state and returns it
Trait Implementations§
Source§impl<T: ?Sized> Default for PooledInlineList<T>
impl<T: ?Sized> Default for PooledInlineList<T>
Source§impl<'a, T: ?Sized> IntoIterator for &'a PooledInlineList<T>
impl<'a, T: ?Sized> IntoIterator for &'a PooledInlineList<T>
Auto Trait Implementations§
impl<T> !Send for PooledInlineList<T>
impl<T> !Sync for PooledInlineList<T>
impl<T> Freeze for PooledInlineList<T>
impl<T> RefUnwindSafe for PooledInlineList<T>where
ItemState<T>: RefUnwindSafe,
T: ?Sized,
impl<T> Unpin for PooledInlineList<T>
impl<T> UnsafeUnpin for PooledInlineList<T>where
ItemState<T>: UnsafeUnpin,
T: ?Sized,
impl<T> UnwindSafe for PooledInlineList<T>where
ItemState<T>: UnwindSafe,
T: ?Sized,
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more