Enum mysql_common::value::Value
source · pub enum Value {
NULL,
Bytes(Vec<u8>),
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>)
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
sourceimpl From<NaiveDateTime> for Value
impl From<NaiveDateTime> for Value
sourcefn from(x: NaiveDateTime) -> Value
fn from(x: NaiveDateTime) -> Value
Converts to this type from the input type.
sourceimpl<T: Serialize> From<Serialized<T>> for Value
impl<T: Serialize> From<Serialized<T>> for Value
sourcefn from(x: Serialized<T>) -> Value
fn from(x: Serialized<T>) -> Value
Converts to this type from the input type.
sourceimpl FromValue for Value
impl FromValue for Value
type Intermediate = Value
sourcefn from_value(v: Value) -> Value
fn from_value(v: Value) -> Value
Will panic if could not convert
v
to Self
.sourcefn 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
.sourcefn 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
.sourceimpl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
1.0.0 · sourcefn 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 moreimpl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more