pub struct Variant { /* private fields */ }Implementations§
Source§impl Variant
impl Variant
pub fn new<B: Into<Vec<u8>>>( contents: B, type_tag: BoxedVariantTypeTag, ) -> BoxedVariantResult<Self>
pub fn type_tag(&self) -> BoxedVariantTypeTag
pub fn dyn_variant(&self) -> &DynBoxedVariant
Trait Implementations§
Source§impl Comparable for Variant
impl Comparable for Variant
fn is_comparable_to(&self, rhs: &Self) -> bool
Source§impl Datum<Value> for Variant
impl Datum<Value> for Variant
Source§fn is_missing(&self) -> bool
fn is_missing(&self) -> bool
Returns true if and only if Value is to be interpreted as
MISSINGSource§fn is_present(&self) -> bool
fn is_present(&self) -> bool
Returns true if Value is neither null nor missing
fn is_sequence(&self) -> bool
fn is_ordered(&self) -> bool
Source§impl<'a> DatumCategory<'a> for Variant
impl<'a> DatumCategory<'a> for Variant
fn category(&'a self) -> DatumCategoryRef<'a>
fn into_category(self) -> DatumCategoryOwned
Source§impl DatumLower<Value> for Variant
impl DatumLower<Value> for Variant
fn into_lower(self) -> DatumLowerResult<Value>
fn into_lower_boxed(self: Box<Self>) -> DatumLowerResult<Value>
fn lower(&self) -> DatumLowerResult<Cow<'_, Value>>
Source§impl From<Box<dyn BoxedVariant>> for Variant
impl From<Box<dyn BoxedVariant>> for Variant
Source§fn from(variant: DynBoxedVariant) -> Self
fn from(variant: DynBoxedVariant) -> Self
Converts to this type from the input type.
Source§impl<T> From<T> for Variantwhere
T: BoxedVariant + 'static,
impl<T> From<T> for Variantwhere
T: BoxedVariant + 'static,
Source§impl IntoIterator for Variant
impl IntoIterator for Variant
Source§impl Ord for Variant
impl Ord for Variant
Source§impl PartialOrd for Variant
impl PartialOrd for Variant
Source§impl PrettyDoc for Variant
impl PrettyDoc for Variant
fn pretty_doc<'b, D, A>(&'b self, arena: &'b D) -> DocBuilder<'b, D, A>
impl DatumValue<Value> for Variant
impl Eq for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl !RefUnwindSafe for Variant
impl !Send for Variant
impl !Sync for Variant
impl Unpin for Variant
impl !UnwindSafe for Variant
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> 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