pub struct Optional<T>(/* private fields */);
Expand description
A datatype that represents an optional value.
Trait Implementations§
Source§impl Datatype for Optional<BigInt>
impl Datatype for Optional<BigInt>
Source§impl Datatype for Optional<Date>
impl Datatype for Optional<Date>
Source§impl Datatype for Optional<DateTime>
impl Datatype for Optional<DateTime>
Source§impl Datatype for Optional<BigRational>
impl Datatype for Optional<BigRational>
Source§impl Datatype for Optional<Time>
impl Datatype for Optional<Time>
Source§impl Datatype for Optional<i128>
impl Datatype for Optional<i128>
Source§impl Datatype for Optional<i16>
impl Datatype for Optional<i16>
Source§impl Datatype for Optional<i32>
impl Datatype for Optional<i32>
Source§impl Datatype for Optional<i64>
impl Datatype for Optional<i64>
Source§impl Datatype for Optional<i8>
impl Datatype for Optional<i8>
Source§impl Datatype for Optional<u128>
impl Datatype for Optional<u128>
Source§impl Datatype for Optional<u16>
impl Datatype for Optional<u16>
Source§impl Datatype for Optional<u32>
impl Datatype for Optional<u32>
Source§impl Datatype for Optional<u64>
impl Datatype for Optional<u64>
Source§impl Datatype for Optional<u8>
impl Datatype for Optional<u8>
Source§impl<T: Ord> Ord for Optional<T>
impl<T: Ord> Ord for Optional<T>
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> PartialOrd for Optional<T>
impl<T: PartialOrd> PartialOrd for Optional<T>
impl<T: Eq> Eq for Optional<T>
impl<T> StructuralPartialEq for Optional<T>
Auto Trait Implementations§
impl<T> Freeze for Optional<T>where
T: Freeze,
impl<T> RefUnwindSafe for Optional<T>where
T: RefUnwindSafe,
impl<T> Send for Optional<T>where
T: Send,
impl<T> Sync for Optional<T>where
T: Sync,
impl<T> Unpin for Optional<T>where
T: Unpin,
impl<T> UnwindSafe for Optional<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more