pub enum Value {
Null(NullKind),
Bool(bool),
I64(i64),
Text(String),
Blob(Vec<u8>),
Uuid(Uuid),
}Expand description
One bound parameter, in the only six shapes this schema stores.
Timestamps are Value::I64 epoch seconds, not a date type — see the
module doc. JSON columns are Value::Text.
Variants§
Null(NullKind)
An absent value, carrying the type of the column it is bound to.
SQLite has no typed null: a bound None is NULL whatever the caller
had in mind. PostgreSQL sends a type OID with every parameter and
refuses column "eab_kid" is of type uuid but expression is of type bigint, so the type an absent value would have had has to survive the
trip. Every bind site knows it statically — Option<Uuid> is
Null(NullKind::Uuid) — so nothing has to be declared twice.
Bool(bool)
I64(i64)
Text(String)
Blob(Vec<u8>)
Uuid(Uuid)
Trait Implementations§
Source§impl Bind for Value
A value that has already been through this enum once.
impl Bind for Value
A value that has already been through this enum once.
What crate::transfer binds: it reads a column at the type its manifest
declares, carries it as a Value, and writes it back without ever naming
a Rust type again. The identity impl is what lets the copy stay one loop
over 140 columns instead of a match per column.
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<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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