pub struct OptionContainer<C> { /* private fields */ }
Expand description
A container that effectively represents default values.
This container is meant to be a minimal non-trivial container,
and may be useful in unifying OrdVal
and OrdKey
spines.
Trait Implementations§
source§impl<C> BatchContainer for OptionContainer<C>
impl<C> BatchContainer for OptionContainer<C>
§type PushItem = <C as BatchContainer>::PushItem
type PushItem = <C as BatchContainer>::PushItem
The type of contained item. Read more
§type ReadItem<'a> = OptionWrapper<'a, C>
type ReadItem<'a> = OptionWrapper<'a, C>
The type that can be read back out of the container.
source§fn with_capacity(size: usize) -> Self
fn with_capacity(size: usize) -> Self
Creates a new container with sufficient capacity.
source§fn merge_capacity(cont1: &Self, cont2: &Self) -> Self
fn merge_capacity(cont1: &Self, cont2: &Self) -> Self
Creates a new container with sufficient capacity.
source§fn index(&self, index: usize) -> Self::ReadItem<'_>
fn index(&self, index: usize) -> Self::ReadItem<'_>
Reference to the element at this position.
source§fn copy_range(&mut self, other: &Self, start: usize, end: usize)
fn copy_range(&mut self, other: &Self, start: usize, end: usize)
Extends from a range of items in another
Self
.Auto Trait Implementations§
impl<C> Freeze for OptionContainer<C>where
C: Freeze,
impl<C> RefUnwindSafe for OptionContainer<C>where
C: RefUnwindSafe,
impl<C> Send for OptionContainer<C>where
C: Send,
impl<C> Sync for OptionContainer<C>where
C: Sync,
impl<C> Unpin for OptionContainer<C>where
C: Unpin,
impl<C> UnwindSafe for OptionContainer<C>where
C: 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
source§impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
source§fn copy_onto(
self,
target: &mut ConsecutiveOffsetPairs<R, O>
) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
fn copy_onto( self, target: &mut ConsecutiveOffsetPairs<R, O> ) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
Copy self into the target container, returning an index that allows to
look up the corresponding read item.