pub struct Optioned<T, B: BuildNone<T>> { /* private fields */ }Expand description
An Optional that represents None with a specified value (B::none()) of T domain.
Trait Implementations§
Source§impl<T: Eq, B: BuildNone<T>> Optional<T> for Optioned<T, B>
impl<T: Eq, B: BuildNone<T>> Optional<T> for Optioned<T, B>
Source§fn to_option_ref(&self) -> Option<&T>
fn to_option_ref(&self) -> Option<&T>
Returns an
Option<&T> that is equivalent to this Optional.Source§fn to_option_mut(&mut self) -> Option<&mut T>
fn to_option_mut(&mut self) -> Option<&mut T>
Returns an
Option<&mut T> that is equivalent to this Optional.Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this
Optional to the equivalent Option.Source§impl<T: Ord, B: Ord + BuildNone<T>> Ord for Optioned<T, B>
impl<T: Ord, B: Ord + BuildNone<T>> Ord for Optioned<T, B>
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<T: PartialOrd, B: PartialOrd + BuildNone<T>> PartialOrd for Optioned<T, B>
impl<T: PartialOrd, B: PartialOrd + BuildNone<T>> PartialOrd for Optioned<T, B>
impl<T: Copy, B: Copy + BuildNone<T>> Copy for Optioned<T, B>
impl<T: Eq, B: Eq + BuildNone<T>> Eq for Optioned<T, B>
impl<T, B: BuildNone<T>> StructuralPartialEq for Optioned<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for Optioned<T, B>where
T: Freeze,
impl<T, B> RefUnwindSafe for Optioned<T, B>where
T: RefUnwindSafe,
B: RefUnwindSafe,
impl<T, B> Send for Optioned<T, B>
impl<T, B> Sync for Optioned<T, B>
impl<T, B> Unpin for Optioned<T, B>
impl<T, B> UnwindSafe for Optioned<T, B>where
T: UnwindSafe,
B: 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