Enum mysql_async::Value
source · pub enum Value {
NULL,
Bytes(Vec<u8, Global>),
Int(i64),
UInt(u64),
Float(f64),
Date(u16, u8, u8, u8, u8, u8, u32),
Time(bool, u32, u8, u8, u8, u32),
}
Expand description
Client side representation of a value of MySql column.
The Value
is also used as a parameter to a prepared statement.
Variants§
NULL
Bytes(Vec<u8, Global>)
Int(i64)
UInt(u64)
Float(f64)
Date(u16, u8, u8, u8, u8, u8, u32)
year, month, day, hour, minutes, seconds, micro seconds
Time(bool, u32, u8, u8, u8, u32)
is negative, days, hours, minutes, seconds, micro seconds
Implementations§
Trait Implementations§
source§impl From<NaiveDateTime> for Value
impl From<NaiveDateTime> for Value
source§fn from(x: NaiveDateTime) -> Value
fn from(x: NaiveDateTime) -> Value
Converts to this type from the input type.
source§impl<T> From<Serialized<T>> for Valuewhere
T: Serialize,
impl<T> From<Serialized<T>> for Valuewhere
T: Serialize,
source§fn from(x: Serialized<T>) -> Value
fn from(x: Serialized<T>) -> Value
Converts to this type from the input type.
source§impl FromValue for Value
impl FromValue for Value
type Intermediate = Value
source§fn from_value(v: Value) -> Value
fn from_value(v: Value) -> Value
Will panic if could not convert
v
to Self
.source§fn from_value_opt(v: Value) -> Result<Value, FromValueError>
fn from_value_opt(v: Value) -> Result<Value, FromValueError>
Will return
Err(Error::FromValueError(v))
if could not convert v
to Self
.source§fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>
fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>
Will return
Err(Error::FromValueError(v))
if v
is not convertible to Self
.source§impl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more