pub enum Value {
Show 27 variants
Bool(Option<bool>),
TinyInt(Option<i8>),
SmallInt(Option<i16>),
Int(Option<i32>),
BigInt(Option<i64>),
TinyUnsigned(Option<u8>),
SmallUnsigned(Option<u16>),
Unsigned(Option<u32>),
BigUnsigned(Option<u64>),
Float(Option<f32>),
Double(Option<f64>),
String(Option<Box<String>>),
Char(Option<char>),
Bytes(Option<Box<Vec<u8>>>),
Json(Option<Box<Value>>),
ChronoDate(Option<Box<NaiveDate>>),
ChronoTime(Option<Box<NaiveTime>>),
ChronoDateTime(Option<Box<NaiveDateTime>>),
ChronoDateTimeUtc(Option<Box<DateTime<Utc>>>),
ChronoDateTimeLocal(Option<Box<DateTime<Local>>>),
ChronoDateTimeWithTimeZone(Option<Box<DateTime<FixedOffset>>>),
TimeDate(Option<Box<Date>>),
TimeTime(Option<Box<Time>>),
TimeDateTime(Option<Box<PrimitiveDateTime>>),
TimeDateTimeWithTimeZone(Option<Box<OffsetDateTime>>),
Uuid(Option<Box<Uuid>>),
Decimal(Option<Box<Decimal>>),
}Expand description
Value variants
We want Value to be exactly 1 pointer sized, so anything larger should be boxed.
Variants§
Bool(Option<bool>)
TinyInt(Option<i8>)
SmallInt(Option<i16>)
Int(Option<i32>)
BigInt(Option<i64>)
TinyUnsigned(Option<u8>)
SmallUnsigned(Option<u16>)
Unsigned(Option<u32>)
BigUnsigned(Option<u64>)
Float(Option<f32>)
Double(Option<f64>)
String(Option<Box<String>>)
Char(Option<char>)
Bytes(Option<Box<Vec<u8>>>)
Json(Option<Box<Value>>)
ChronoDate(Option<Box<NaiveDate>>)
ChronoTime(Option<Box<NaiveTime>>)
ChronoDateTime(Option<Box<NaiveDateTime>>)
ChronoDateTimeUtc(Option<Box<DateTime<Utc>>>)
ChronoDateTimeLocal(Option<Box<DateTime<Local>>>)
ChronoDateTimeWithTimeZone(Option<Box<DateTime<FixedOffset>>>)
TimeDate(Option<Box<Date>>)
TimeTime(Option<Box<Time>>)
TimeDateTime(Option<Box<PrimitiveDateTime>>)
TimeDateTimeWithTimeZone(Option<Box<OffsetDateTime>>)
Uuid(Option<Box<Uuid>>)
Decimal(Option<Box<Decimal>>)
Implementations§
Source§impl Value
impl Value
pub fn is_chrono_date(&self) -> bool
pub fn as_ref_chrono_date(&self) -> Option<&NaiveDate>
Source§impl Value
impl Value
pub fn is_time_date(&self) -> bool
pub fn as_ref_time_date(&self) -> Option<&Date>
Source§impl Value
impl Value
pub fn is_chrono_time(&self) -> bool
pub fn as_ref_chrono_time(&self) -> Option<&NaiveTime>
Source§impl Value
impl Value
pub fn is_time_time(&self) -> bool
pub fn as_ref_time_time(&self) -> Option<&Time>
Source§impl Value
impl Value
pub fn is_chrono_date_time(&self) -> bool
pub fn as_ref_chrono_date_time(&self) -> Option<&NaiveDateTime>
Source§impl Value
impl Value
pub fn is_time_date_time(&self) -> bool
pub fn as_ref_time_date_time(&self) -> Option<&PrimitiveDateTime>
Source§impl Value
impl Value
pub fn is_chrono_date_time_utc(&self) -> bool
pub fn as_ref_chrono_date_time_utc(&self) -> Option<&DateTime<Utc>>
Source§impl Value
impl Value
pub fn is_chrono_date_time_local(&self) -> bool
pub fn as_ref_chrono_date_time_local(&self) -> Option<&DateTime<Local>>
Source§impl Value
impl Value
pub fn is_chrono_date_time_with_time_zone(&self) -> bool
pub fn as_ref_chrono_date_time_with_time_zone( &self, ) -> Option<&DateTime<FixedOffset>>
Source§impl Value
impl Value
pub fn is_time_date_time_with_time_zone(&self) -> bool
pub fn as_ref_time_date_time_with_time_zone(&self) -> Option<&OffsetDateTime>
Source§impl Value
impl Value
pub fn is_decimal(&self) -> bool
pub fn as_ref_decimal(&self) -> Option<&Decimal>
pub fn decimal_to_f64(&self) -> Option<f64>
Trait Implementations§
Source§impl From<NaiveDateTime> for Value
impl From<NaiveDateTime> for Value
Source§fn from(x: NaiveDateTime) -> Value
fn from(x: NaiveDateTime) -> Value
Converts to this type from the input type.
Source§impl From<PrimitiveDateTime> for Value
impl From<PrimitiveDateTime> for Value
Source§fn from(x: PrimitiveDateTime) -> Value
fn from(x: PrimitiveDateTime) -> Value
Converts to this type from the input type.
Source§impl From<OffsetDateTime> for Value
impl From<OffsetDateTime> for Value
Source§fn from(v: OffsetDateTime) -> Value
fn from(v: OffsetDateTime) -> Value
Converts to this type from the input type.
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request