pub enum Value<'a> {
Str(Cow<'a, str>),
Int64(i64),
Float64(f64),
Bool(bool),
Date32(i32),
Timestamp(i64),
Null,
}Expand description
A logical value produced by a decoder.
Decoders can emit borrowed strings when possible, or native typed values for formats like JSON that already distinguish numbers/booleans.
Str is a Cow so that adapters needing owned storage (e.g. XML entity
unescaping) can move an owned String into the value without a dangling
borrow.
Variants§
Str(Cow<'a, str>)
UTF-8 string, borrowed from the input buffer or owned.
Int64(i64)
64-bit signed integer.
Float64(f64)
64-bit floating point number.
Bool(bool)
Boolean.
Date32(i32)
Calendar date: days since the Unix epoch (Arrow Date32).
Timestamp(i64)
Point in time as a raw integer in the column’s TimeUnit
(Arrow Timestamp). Adapters should declare the unit via
field_types so the raw integer is interpreted correctly.
Null
Explicit null / missing value.
Implementations§
Trait Implementations§
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnsafeUnpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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