pub enum Value {
}Expand description
A dynamic database value that can represent any MySQL column type.
This enum provides a type-safe way to pass values to queries and convert between Rust types and MySQL types.
Variants§
Null
SQL NULL value
Bool(bool)
Boolean value
I8(i8)
Signed 8-bit integer
I16(i16)
Signed 16-bit integer
I32(i32)
Signed 32-bit integer
I64(i64)
Signed 64-bit integer
U8(u8)
Unsigned 8-bit integer
U16(u16)
Unsigned 16-bit integer
U32(u32)
Unsigned 32-bit integer
U64(u64)
Unsigned 64-bit integer
F32(f32)
32-bit floating point
F64(f64)
64-bit floating point
String(String)
String/text value
Bytes(Vec<u8>)
Binary data
Date(NaiveDate)
Date value
DateTime(NaiveDateTime)
DateTime/Timestamp value
Time(NaiveTime)
Time value
Decimal(Decimal)
Decimal value
Json(Value)
JSON value
Implementations§
Trait Implementations§
Source§impl From<NaiveDateTime> for Value
impl From<NaiveDateTime> for Value
Source§fn from(v: NaiveDateTime) -> Self
fn from(v: NaiveDateTime) -> Self
Converts to this type from the input type.
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