Enum sea_query::value::Value[][src]

pub enum Value {
Show variants Null, Bool(bool), TinyInt(i8), SmallInt(i16), Int(i32), BigInt(i64), TinyUnsigned(u8), SmallUnsigned(u16), Unsigned(u32), BigUnsigned(u64), Float(f32), Double(f64), String(Box<String>), Bytes(Box<Vec<u8>>), Json(Box<Json>), DateTime(Box<NaiveDateTime>), Uuid(Box<Uuid>),
}
Expand description

Value variants

Variants

Null
Bool(bool)
TinyInt(i8)
SmallInt(i16)
Int(i32)
BigInt(i64)
TinyUnsigned(u8)
SmallUnsigned(u16)
Unsigned(u32)
BigUnsigned(u64)
Float(f32)
Double(f64)
String(Box<String>)
Bytes(Box<Vec<u8>>)
Json(Box<Json>)
This is supported on crate feature with-json only.
DateTime(Box<NaiveDateTime>)
This is supported on crate feature with-chrono only.
Uuid(Box<Uuid>)
This is supported on crate feature with-uuid only.

Implementations

impl Value[src]

pub fn unwrap<T>(self) -> T where
    T: ValueType
[src]

impl Value[src]

pub fn is_json(&self) -> bool[src]

pub fn as_ref_json(&self) -> &Json[src]

impl Value[src]

pub fn is_date_time(&self) -> bool[src]

pub fn as_ref_date_time(&self) -> &NaiveDateTime[src]

impl Value[src]

pub fn is_uuid(&self) -> bool[src]

pub fn as_ref_uuid(&self) -> &Uuid[src]

Trait Implementations

impl Clone for Value[src]

fn clone(&self) -> Value[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Value[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Value[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl<'a> From<&'a [u8]> for Value[src]

fn from(x: &'a [u8]) -> Value[src]

Performs the conversion.

impl<'a> From<&'a str> for Value[src]

fn from(x: &'a str) -> Value[src]

Performs the conversion.

impl From<NaiveDateTime> for Value[src]

This is supported on crate feature with-chrono only.

fn from(x: NaiveDateTime) -> Value[src]

Performs the conversion.

impl From<Option<String>> for Value[src]

fn from(x: Option<String>) -> Value[src]

Performs the conversion.

impl From<Option<Vec<u8, Global>>> for Value[src]

fn from(x: Option<Vec<u8>>) -> Value[src]

Performs the conversion.

impl From<Option<bool>> for Value[src]

fn from(x: Option<bool>) -> Value[src]

Performs the conversion.

impl From<Option<f32>> for Value[src]

fn from(x: Option<f32>) -> Value[src]

Performs the conversion.

impl From<Option<f64>> for Value[src]

fn from(x: Option<f64>) -> Value[src]

Performs the conversion.

impl From<Option<i16>> for Value[src]

fn from(x: Option<i16>) -> Value[src]

Performs the conversion.

impl From<Option<i32>> for Value[src]

fn from(x: Option<i32>) -> Value[src]

Performs the conversion.

impl From<Option<i64>> for Value[src]

fn from(x: Option<i64>) -> Value[src]

Performs the conversion.

impl From<Option<i8>> for Value[src]

fn from(x: Option<i8>) -> Value[src]

Performs the conversion.

impl From<Option<u16>> for Value[src]

fn from(x: Option<u16>) -> Value[src]

Performs the conversion.

impl From<Option<u32>> for Value[src]

fn from(x: Option<u32>) -> Value[src]

Performs the conversion.

impl From<Option<u64>> for Value[src]

fn from(x: Option<u64>) -> Value[src]

Performs the conversion.

impl From<Option<u8>> for Value[src]

fn from(x: Option<u8>) -> Value[src]

Performs the conversion.

impl From<String> for Value[src]

fn from(x: String) -> Value[src]

Performs the conversion.

impl From<Uuid> for Value[src]

This is supported on crate feature with-uuid only.

fn from(x: Uuid) -> Value[src]

Performs the conversion.

impl From<Value> for Value[src]

This is supported on crate feature with-json only.

fn from(x: Json) -> Value[src]

Performs the conversion.

impl From<Vec<u8, Global>> for Value[src]

fn from(x: Vec<u8>) -> Value[src]

Performs the conversion.

impl From<bool> for Value[src]

fn from(x: bool) -> Value[src]

Performs the conversion.

impl From<f32> for Value[src]

fn from(x: f32) -> Value[src]

Performs the conversion.

impl From<f64> for Value[src]

fn from(x: f64) -> Value[src]

Performs the conversion.

impl From<i16> for Value[src]

fn from(x: i16) -> Value[src]

Performs the conversion.

impl From<i32> for Value[src]

fn from(x: i32) -> Value[src]

Performs the conversion.

impl From<i64> for Value[src]

fn from(x: i64) -> Value[src]

Performs the conversion.

impl From<i8> for Value[src]

fn from(x: i8) -> Value[src]

Performs the conversion.

impl From<u16> for Value[src]

fn from(x: u16) -> Value[src]

Performs the conversion.

impl From<u32> for Value[src]

fn from(x: u32) -> Value[src]

Performs the conversion.

impl From<u64> for Value[src]

fn from(x: u64) -> Value[src]

Performs the conversion.

impl From<u8> for Value[src]

fn from(x: u8) -> Value[src]

Performs the conversion.

impl PartialEq<Value> for Value[src]

fn eq(&self, other: &Value) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Value) -> bool[src]

This method tests for !=.

impl ToSql for Value[src]

fn to_sql(
    &self,
    ty: &Type,
    out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
[src]

Converts the value of self into the binary format of the specified Postgres Type, appending it to out. Read more

fn accepts(_ty: &Type) -> bool[src]

Determines if a value of this type can be converted to the specified Postgres Type. Read more

fn to_sql_checked(
    &self,
    ty: &Type,
    out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
[src]

An adaptor method used internally by Rust-Postgres. Read more

impl StructuralPartialEq for Value[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> BorrowToSql for T where
    T: ToSql
[src]

pub fn borrow_to_sql(&self) -> &dyn ToSql[src]

Returns a reference to self as a ToSql trait object.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<V> IntoValueTuple for V where
    V: Into<Value>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V