#[non_exhaustive]pub enum Value {
}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
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).
Decimal(Decimal)
Fixed-point decimal for money/exact-numeric columns (requires the
decimal feature). Bound natively on Postgres/MySQL (NUMERIC/DECIMAL)
and as TEXT on SQLite (which has no native decimal type).
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
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>
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>
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