pub enum Value {
Show 22 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, Global>>),
Bytes(Option<Box<Vec<u8, Global>, Global>>),
Json(Option<Box<Value, Global>>),
Date(Option<Box<NaiveDate, Global>>),
Time(Option<Box<NaiveTime, Global>>),
DateTime(Option<Box<NaiveDateTime, Global>>),
DateTimeUtc(Option<Box<DateTime<Utc>, Global>>),
DateTimeLocal(Option<Box<DateTime<Local>, Global>>),
DateTimeWithTimeZone(Option<Box<DateTime<FixedOffset>, Global>>),
Uuid(Option<Box<Uuid, Global>>),
Decimal(Option<Box<Decimal, Global>>),
}
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, Global>>)
Bytes(Option<Box<Vec<u8, Global>, Global>>)
Json(Option<Box<Value, Global>>)
Date(Option<Box<NaiveDate, Global>>)
Time(Option<Box<NaiveTime, Global>>)
DateTime(Option<Box<NaiveDateTime, Global>>)
DateTimeUtc(Option<Box<DateTime<Utc>, Global>>)
DateTimeLocal(Option<Box<DateTime<Local>, Global>>)
DateTimeWithTimeZone(Option<Box<DateTime<FixedOffset>, Global>>)
Uuid(Option<Box<Uuid, Global>>)
Decimal(Option<Box<Decimal, Global>>)
Implementations
sourceimpl Value
impl Value
pub fn is_date_time(&self) -> bool
pub fn as_ref_date_time(&self) -> Option<&NaiveDateTime>
sourceimpl Value
impl Value
pub fn is_date_time_utc(&self) -> bool
pub fn is_date_time_local(&self) -> bool
pub fn is_date_time_with_time_zone(&self) -> bool
pub fn as_ref_date_time_utc(&self) -> Option<&DateTime<Utc>>
pub fn as_ref_date_time_local(&self) -> Option<&DateTime<Local>>
pub fn as_ref_date_time_with_time_zone(&self) -> Option<&DateTime<FixedOffset>>
pub fn as_naive_utc_in_string(&self) -> Option<String>
sourceimpl 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>
sourceimpl Value
impl Value
pub fn is_big_decimal(&self) -> bool
pub fn as_ref_big_decimal(&self) -> Option<&bool>
pub fn big_decimal_to_f64(&self) -> Option<f64>
Trait Implementations
sourceimpl From<DateTime<FixedOffset>> for Value
impl From<DateTime<FixedOffset>> for Value
sourcefn from(x: DateTime<FixedOffset>) -> Value
fn from(x: DateTime<FixedOffset>) -> Value
Converts to this type from the input type.
sourceimpl From<NaiveDateTime> for Value
impl From<NaiveDateTime> for Value
sourcefn from(x: NaiveDateTime) -> Value
fn from(x: NaiveDateTime) -> Value
Converts to this type from the input type.
impl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<V> IntoValueTuple for V where
V: Into<Value>,
impl<V> IntoValueTuple for V where
V: Into<Value>,
fn into_value_tuple(self) -> ValueTuple
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more