Enum scylla::deserialize::value::MaybeEmpty
source · pub enum MaybeEmpty<T>where
T: Emptiable,{
Empty,
Value(T),
}
Expand description
A value that may be empty or not.
MaybeEmpty
was introduced to help support the quirk described in Emptiable
for Rust types which can’t represent the empty, additional value.
Variants§
Trait Implementations§
source§impl<T> Clone for MaybeEmpty<T>
impl<T> Clone for MaybeEmpty<T>
source§fn clone(&self) -> MaybeEmpty<T>
fn clone(&self) -> MaybeEmpty<T>
Returns a copy 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 for MaybeEmpty<T>
impl<T> Debug for MaybeEmpty<T>
source§impl<'frame, 'metadata, T> DeserializeValue<'frame, 'metadata> for MaybeEmpty<T>where
T: DeserializeValue<'frame, 'metadata> + Emptiable,
impl<'frame, 'metadata, T> DeserializeValue<'frame, 'metadata> for MaybeEmpty<T>where
T: DeserializeValue<'frame, 'metadata> + Emptiable,
source§fn type_check(typ: &ColumnType<'_>) -> Result<(), TypeCheckError>
fn type_check(typ: &ColumnType<'_>) -> Result<(), TypeCheckError>
Checks that the column type matches what this type expects.
source§fn deserialize(
typ: &'metadata ColumnType<'metadata>,
v: Option<FrameSlice<'frame>>,
) -> Result<MaybeEmpty<T>, DeserializationError>
fn deserialize( typ: &'metadata ColumnType<'metadata>, v: Option<FrameSlice<'frame>>, ) -> Result<MaybeEmpty<T>, DeserializationError>
Deserialize a column value from given serialized representation. Read more
source§impl<T> Hash for MaybeEmpty<T>
impl<T> Hash for MaybeEmpty<T>
source§impl<T> Ord for MaybeEmpty<T>
impl<T> Ord for MaybeEmpty<T>
source§fn cmp(&self, other: &MaybeEmpty<T>) -> Ordering
fn cmp(&self, other: &MaybeEmpty<T>) -> Ordering
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> PartialEq for MaybeEmpty<T>
impl<T> PartialEq for MaybeEmpty<T>
source§fn eq(&self, other: &MaybeEmpty<T>) -> bool
fn eq(&self, other: &MaybeEmpty<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> PartialOrd for MaybeEmpty<T>where
T: PartialOrd + Emptiable,
impl<T> PartialOrd for MaybeEmpty<T>where
T: PartialOrd + Emptiable,
source§fn partial_cmp(&self, other: &MaybeEmpty<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &MaybeEmpty<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T> Copy for MaybeEmpty<T>
impl<T> Eq for MaybeEmpty<T>
impl<T> StructuralPartialEq for MaybeEmpty<T>where
T: Emptiable,
Auto Trait Implementations§
impl<T> Freeze for MaybeEmpty<T>where
T: Freeze,
impl<T> RefUnwindSafe for MaybeEmpty<T>where
T: RefUnwindSafe,
impl<T> Send for MaybeEmpty<T>where
T: Send,
impl<T> Sync for MaybeEmpty<T>where
T: Sync,
impl<T> Unpin for MaybeEmpty<T>where
T: Unpin,
impl<T> UnwindSafe for MaybeEmpty<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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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