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
Presence when combined with Option.
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.
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> Access<T> for T
impl<T> Access<T> for T
Source§type RemainderFrom<Source: Access<T>> = PhantomData<T>
type RemainderFrom<Source: Access<T>> = PhantomData<T>
Remainder type when extracting Self from Source.
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Consume and convert to Option.
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, A> Extract<PhantomData<T>, T> for Awhere
A: Access<T>,
impl<T, A> Extract<PhantomData<T>, T> for Awhere
A: Access<T>,
Source§fn extract(
self,
) -> (PhantomData<T>, <PhantomData<T> as Access<T>>::RemainderFrom<A>)
fn extract( self, ) -> (PhantomData<T>, <PhantomData<T> as Access<T>>::RemainderFrom<A>)
Extract a value into target type and remainder parts.
Source§impl<T> Extract<T, T> for T
impl<T> Extract<T, T> for T
Source§fn extract(self) -> (T, <T as Access<T>>::RemainderFrom<T>)
fn extract(self) -> (T, <T as Access<T>>::RemainderFrom<T>)
Extract a value into target type and remainder parts.
Source§impl<T> InferPresence<T> for T
impl<T> InferPresence<T> for T
Source§impl<T, A> TryExtract<Option<T>, T> for Awhere
A: Access<T>,
impl<T, A> TryExtract<Option<T>, T> for Awhere
A: Access<T>,
Source§impl<T, A> TryExtract<PhantomData<T>, T> for Awhere
A: Access<T>,
impl<T, A> TryExtract<PhantomData<T>, T> for Awhere
A: Access<T>,
Source§fn try_extract(
self,
) -> Result<(PhantomData<T>, <PhantomData<T> as Access<T>>::RemainderFrom<A>), A>where
PhantomData<T>: Access<T>,
fn try_extract(
self,
) -> Result<(PhantomData<T>, <PhantomData<T> as Access<T>>::RemainderFrom<A>), A>where
PhantomData<T>: Access<T>,
Try to extract a value into target type and remainder parts. Read more
Source§impl<T> TryExtract<T, T> for T
impl<T> TryExtract<T, T> for T
Source§fn try_extract(self) -> Result<(T, <T as Access<T>>::RemainderFrom<T>), T>
fn try_extract(self) -> Result<(T, <T as Access<T>>::RemainderFrom<T>), T>
Try to extract a value into target type and remainder parts. Read more