pub enum Value {
NULL,
Bytes(Vec<u8>),
Int(i64),
UInt(u64),
Float(f32),
Double(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>)
Int(i64)
UInt(u64)
Float(f32)
Double(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<BigDecimal> for Value
impl From<BigDecimal> for Value
Source§fn from(big_decimal: BigDecimal) -> Value
fn from(big_decimal: BigDecimal) -> Value
Converts to this type from the input type.
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 From<PrimitiveDateTime> for Value
impl From<PrimitiveDateTime> for Value
Source§fn from(x: PrimitiveDateTime) -> Value
fn from(x: PrimitiveDateTime) -> 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 for Value
impl PartialOrd for Value
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 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