#[non_exhaustive]pub enum Value {
Null,
Bool(bool),
I64(i64),
F64(f64),
Text(String),
Bytes(Vec<u8>),
Json(Value),
Uuid(Uuid),
DateTimeUtc(DateTime<Utc>),
NaiveDateTime(NaiveDateTime),
NaiveDate(NaiveDate),
NaiveTime(NaiveTime),
}Expand description
A dialect-agnostic bound parameter value.
This enum is #[non_exhaustive] so new variants can be added without a
breaking change; downstream matches must include a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Null
SQL NULL.
Bool(bool)
Boolean.
I64(i64)
Signed 64-bit integer (the canonical integer binding type).
F64(f64)
64-bit floating point.
Text(String)
UTF-8 text.
Bytes(Vec<u8>)
Raw bytes / BLOB.
Json(Value)
JSON value (requires the json feature).
Uuid(Uuid)
UUID (requires the uuid feature).
DateTimeUtc(DateTime<Utc>)
Timezone-aware timestamp in UTC (requires the chrono feature).
NaiveDateTime(NaiveDateTime)
Naive (timezone-less) date and time (requires the chrono feature).
NaiveDate(NaiveDate)
Naive date (requires the chrono feature).
NaiveTime(NaiveTime)
Naive time of day (requires the chrono feature).
Trait Implementations§
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 UnsafeUnpin for Value
impl UnwindSafe for Value
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<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 more