pub enum Value<'a> {
Show 24 variants
Null(NullType),
Ident(&'a str),
Column {
table_name: Option<&'a str>,
column_name: &'a str,
},
Choice(&'a str),
String(&'a str),
I64(i64),
I32(i32),
I16(i16),
Bool(bool),
F64(f64),
F32(f32),
Binary(&'a [u8]),
ChronoNaiveTime(NaiveTime),
ChronoNaiveDate(NaiveDate),
ChronoNaiveDateTime(NaiveDateTime),
ChronoDateTime(DateTime<Utc>),
TimeDate(Date),
TimeTime(Time),
TimeOffsetDateTime(OffsetDateTime),
TimePrimitiveDateTime(PrimitiveDateTime),
Uuid(Uuid),
UuidHyphenated(Uuid),
UuidSimple(Uuid),
JsonValue(&'a Value),
}
Expand description
This enum represents a value
Variants§
Null(NullType)
null representation
Ident(&'a str)
Representation of an identifier, e.g. a column. This variant will not be escaped, so do not pass unchecked data to it.
Column
Representation of a column name with an optional table name
Choice(&'a str)
Representation of choices
String(&'a str)
String representation
I64(i64)
i64 representation
I32(i32)
i32 representation
I16(i16)
i16 representation
Bool(bool)
Bool representation
F64(f64)
f64 representation
F32(f32)
f32 representation
Binary(&'a [u8])
binary representation
ChronoNaiveTime(NaiveTime)
chrono’s Naive Time representation
ChronoNaiveDate(NaiveDate)
chrono’s Naive Date representation
ChronoNaiveDateTime(NaiveDateTime)
chrono’s Naive DateTime representation
ChronoDateTime(DateTime<Utc>)
chrono’s Timezone aware datetime
TimeDate(Date)
time’s date representation
TimeTime(Time)
time’s time representation
TimeOffsetDateTime(OffsetDateTime)
time’s offset datetime representation
TimePrimitiveDateTime(PrimitiveDateTime)
time’s primitive datetime representation
Uuid(Uuid)
Uuid representation
UuidHyphenated(Uuid)
Uuid in hyphenated representation
UuidSimple(Uuid)
Uuid in simple text representation
JsonValue(&'a Value)
serde_json’s Value representation
Trait Implementations§
impl<'a> Copy for Value<'a>
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
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