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<T> From<ParseIr<Deserialized<T>>> for Valuewhere
T: DeserializeOwned,
impl<T> From<ParseIr<Deserialized<T>>> for Valuewhere
T: DeserializeOwned,
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 = ValueIr
Source§fn from_value(v: Value) -> Self
fn from_value(v: Value) -> Self
Will panic if could not convert
v
to Self
.Source§fn from_value_opt(v: Value) -> Result<Self, FromValueError>
fn from_value_opt(v: Value) -> Result<Self, 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 MySerialize for Value
impl MySerialize for Value
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