pub struct Present;Expand description
Marker indicating a field is present with a concrete value.
Trait Implementations§
Source§impl Presence for Present
impl Presence for Present
Source§type OptionOrSelf = Present
type OptionOrSelf = Present
The presence state when combined with an Option.
Source§type RemainderFrom<Source: Presence> = Absent
type RemainderFrom<Source: Presence> = Absent
What remains from
Source when extracting Self. Present/Optional → Absent; Absent → Source.Source§type Output<T> = T
type Output<T> = T
The container type for values with this presence (T, Option<T>, or
PhantomData<T>).Source§fn or<T, Other: Presence>(
self_: <Self as Presence>::Output<T>,
_other: Other::Output<T>,
) -> <<Self as Presence>::Or<Other> as Presence>::Output<T>
fn or<T, Other: Presence>( self_: <Self as Presence>::Output<T>, _other: Other::Output<T>, ) -> <<Self as Presence>::Or<Other> as Presence>::Output<T>
Merge two values, preferring the first if present.
Source§fn option_or_self<T>(
option: Option<T>,
self_: <Self as Presence>::Output<T>,
) -> <<Self as Presence>::OptionOrSelf as Presence>::Output<T>
fn option_or_self<T>( option: Option<T>, self_: <Self as Presence>::Output<T>, ) -> <<Self as Presence>::OptionOrSelf as Presence>::Output<T>
Convert an Option into the appropriate presence state.
Source§impl Split<Absent> for Present
impl Split<Absent> for Present
Source§fn split<T>(value: T) -> (PhantomData<T>, T)
fn split<T>(value: T) -> (PhantomData<T>, T)
Split a value into selected and remainder parts.
Source§impl Split<Optional> for Present
impl Split<Optional> for Present
Source§fn split<T>(value: T) -> (Option<T>, PhantomData<T>)
fn split<T>(value: T) -> (Option<T>, PhantomData<T>)
Split a value into selected and remainder parts.
Auto Trait Implementations§
impl Freeze for Present
impl RefUnwindSafe for Present
impl Send for Present
impl Sync for Present
impl Unpin for Present
impl UnwindSafe for Present
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