pub enum MaybeDefault<T> {
None,
Default,
Some(T),
}Expand description
A type representing an optional value or a default.
Variants§
Trait Implementations§
Source§impl<T: Clone> Clone for MaybeDefault<T>
impl<T: Clone> Clone for MaybeDefault<T>
Source§fn clone(&self) -> MaybeDefault<T>
fn clone(&self) -> MaybeDefault<T>
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<T: Debug> Debug for MaybeDefault<T>
impl<T: Debug> Debug for MaybeDefault<T>
Source§impl<T> From<T> for MaybeDefault<T>
impl<T> From<T> for MaybeDefault<T>
Source§impl<T: PartialEq> PartialEq for MaybeDefault<T>
impl<T: PartialEq> PartialEq for MaybeDefault<T>
impl<T> StructuralPartialEq for MaybeDefault<T>
Auto Trait Implementations§
impl<T> Freeze for MaybeDefault<T>where
T: Freeze,
impl<T> RefUnwindSafe for MaybeDefault<T>where
T: RefUnwindSafe,
impl<T> Send for MaybeDefault<T>where
T: Send,
impl<T> Sync for MaybeDefault<T>where
T: Sync,
impl<T> Unpin for MaybeDefault<T>where
T: Unpin,
impl<T> UnwindSafe for MaybeDefault<T>where
T: 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