#[repr(transparent)]pub struct NichedOption<U, const N: usize>(pub Option<U>);Expand description
Optional type which uses NichedOptionULE<U,N> as ULE type.
The implementors guarantee that N == core::mem::size_of::<Self>()
[repr(transparent)] guarantees that the layout is same as Option<U>
Tuple Fields§
§0: Option<U>Trait Implementations§
Source§impl<U: AsULE, const N: usize> AsULE for NichedOption<U, N>where
    U::ULE: NicheBytes<N>,
 
impl<U: AsULE, const N: usize> AsULE for NichedOption<U, N>where
    U::ULE: NicheBytes<N>,
Source§impl<U: Clone, const N: usize> Clone for NichedOption<U, N>
 
impl<U: Clone, const N: usize> Clone for NichedOption<U, N>
Source§fn clone(&self) -> NichedOption<U, N>
 
fn clone(&self) -> NichedOption<U, N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl<U, const N: usize> Default for NichedOption<U, N>
 
impl<U, const N: usize> Default for NichedOption<U, N>
Source§impl<T, const N: usize> IntoIterator for NichedOption<T, N>
 
impl<T, const N: usize> IntoIterator for NichedOption<T, N>
Source§impl<U: Ord, const N: usize> Ord for NichedOption<U, N>
 
impl<U: Ord, const N: usize> Ord for NichedOption<U, N>
Source§fn cmp(&self, other: &NichedOption<U, N>) -> Ordering
 
fn cmp(&self, other: &NichedOption<U, N>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<U: PartialOrd, const N: usize> PartialOrd for NichedOption<U, N>
 
impl<U: PartialOrd, const N: usize> PartialOrd for NichedOption<U, N>
Source§impl<'a, T: AsULE + 'static, const N: usize> ZeroMapKV<'a> for NichedOption<T, N>where
    T::ULE: NicheBytes<N>,
 
impl<'a, T: AsULE + 'static, const N: usize> ZeroMapKV<'a> for NichedOption<T, N>where
    T::ULE: NicheBytes<N>,
Source§type Container = ZeroVec<'a, NichedOption<T, N>>
 
type Container = ZeroVec<'a, NichedOption<T, N>>
The container that can be used with this type: 
ZeroVec or VarZeroVec.type Slice = ZeroSlice<NichedOption<T, N>>
Source§type GetType = <NichedOption<T, N> as AsULE>::ULE
 
type GetType = <NichedOption<T, N> as AsULE>::ULE
The type produced by 
Container::get() Read moreSource§type OwnedType = NichedOption<T, N>
 
type OwnedType = NichedOption<T, N>
The type produced by 
Container::replace() and Container::remove(),
also used during deserialization. If Self is human readable serialized,
deserializing to Self::OwnedType should produce the same value once
passed through Self::owned_as_self() Read moreimpl<U: Copy, const N: usize> Copy for NichedOption<U, N>
impl<U: Eq, const N: usize> Eq for NichedOption<U, N>
impl<U, const N: usize> StructuralPartialEq for NichedOption<U, N>
Auto Trait Implementations§
impl<U, const N: usize> Freeze for NichedOption<U, N>where
    U: Freeze,
impl<U, const N: usize> RefUnwindSafe for NichedOption<U, N>where
    U: RefUnwindSafe,
impl<U, const N: usize> Send for NichedOption<U, N>where
    U: Send,
impl<U, const N: usize> Sync for NichedOption<U, N>where
    U: Sync,
impl<U, const N: usize> Unpin for NichedOption<U, N>where
    U: Unpin,
impl<U, const N: usize> UnwindSafe for NichedOption<U, N>where
    U: 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