pub enum DatabaseValue {
}Expand description
Database value enumeration for type-safe parameter binding
Variants§
Null
Bool(bool)
Int32(i32)
Int64(i64)
Float32(f32)
Float64(f64)
String(String)
Bytes(Vec<u8>)
Uuid(Uuid)
DateTime(DateTime<Utc>)
Date(NaiveDate)
Time(NaiveTime)
Json(Value)
Array(Vec<DatabaseValue>)
Implementations§
Source§impl DatabaseValue
impl DatabaseValue
Source§impl DatabaseValue
impl DatabaseValue
Sourcepub fn from_json_value(value: &Value) -> DatabaseValue
pub fn from_json_value(value: &Value) -> DatabaseValue
Convert a JSON value to a DatabaseValue
Trait Implementations§
Source§impl Clone for DatabaseValue
impl Clone for DatabaseValue
Source§fn clone(&self) -> DatabaseValue
fn clone(&self) -> DatabaseValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatabaseValue
impl Debug for DatabaseValue
Source§impl From<&str> for DatabaseValue
impl From<&str> for DatabaseValue
Source§impl From<NaiveDate> for DatabaseValue
impl From<NaiveDate> for DatabaseValue
Source§impl From<NaiveTime> for DatabaseValue
impl From<NaiveTime> for DatabaseValue
Source§impl<T> From<Option<T>> for DatabaseValuewhere
T: Into<DatabaseValue>,
impl<T> From<Option<T>> for DatabaseValuewhere
T: Into<DatabaseValue>,
Source§impl From<String> for DatabaseValue
impl From<String> for DatabaseValue
Source§impl From<Uuid> for DatabaseValue
impl From<Uuid> for DatabaseValue
Source§impl From<Value> for DatabaseValue
impl From<Value> for DatabaseValue
Source§impl From<bool> for DatabaseValue
impl From<bool> for DatabaseValue
Source§impl From<f32> for DatabaseValue
impl From<f32> for DatabaseValue
Source§impl From<f64> for DatabaseValue
impl From<f64> for DatabaseValue
Source§impl From<i32> for DatabaseValue
impl From<i32> for DatabaseValue
Source§impl From<i64> for DatabaseValue
impl From<i64> for DatabaseValue
Source§impl PartialEq for DatabaseValue
impl PartialEq for DatabaseValue
impl StructuralPartialEq for DatabaseValue
Auto Trait Implementations§
impl Freeze for DatabaseValue
impl RefUnwindSafe for DatabaseValue
impl Send for DatabaseValue
impl Sync for DatabaseValue
impl Unpin for DatabaseValue
impl UnwindSafe for DatabaseValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more