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
sourcepub fn from(x: DateTime<FixedOffset>) -> Value
pub fn from(x: DateTime<FixedOffset>) -> Value
Performs the conversion.
sourceimpl From<NaiveDateTime> for Value
impl From<NaiveDateTime> for Value
sourcepub fn from(x: NaiveDateTime) -> Value
pub fn from(x: NaiveDateTime) -> Value
Performs the conversion.
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<V> IntoValueTuple for V where
V: Into<Value>,
impl<V> IntoValueTuple for V where
V: Into<Value>,
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub 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>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more