pub struct ValueSingleOrList<T> { /* private fields */ }Expand description
A list like struct optimized for holding zero or one items.
Once more than one value has been added to this storage it will switch to
using a Vec internally.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ValueSingleOrList<T>
impl<T> RefUnwindSafe for ValueSingleOrList<T>
impl<T> Send for ValueSingleOrList<T>
impl<T> Sync for ValueSingleOrList<T>
impl<T> Unpin for ValueSingleOrList<T>
impl<T> UnsafeUnpin for ValueSingleOrList<T>
impl<T> UnwindSafe for ValueSingleOrList<T>
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