pub trait ValueType: Sized {
// Required methods
fn try_from(v: Value) -> Result<Self, ValueTypeErr>;
fn type_name() -> String;
fn array_type() -> ArrayType;
fn column_type() -> ColumnType;
// Provided methods
fn unwrap(v: Value) -> Self { ... }
fn expect(v: Value, msg: &str) -> Self { ... }
fn is_option() -> bool { ... }
fn enum_type_name() -> Option<&'static str> { ... }
}Required Methodsยง
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Provided Methodsยง
fn unwrap(v: Value) -> Self
fn expect(v: Value, msg: &str) -> Self
fn is_option() -> bool
fn enum_type_name() -> Option<&'static str>
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Typesยง
Sourceยงimpl ValueType for Cow<'_, str>
impl ValueType for Cow<'_, str>
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for bool
impl ValueType for bool
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for char
impl ValueType for char
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for f32
impl ValueType for f32
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for f64
impl ValueType for f64
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for i8
impl ValueType for i8
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for i16
impl ValueType for i16
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for i32
impl ValueType for i32
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for i64
impl ValueType for i64
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for u8
impl ValueType for u8
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for u16
impl ValueType for u16
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for u32
impl ValueType for u32
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for u64
impl ValueType for u64
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for String
impl ValueType for String
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Vec<u8>
impl ValueType for Vec<u8>
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Date
Available on crate feature with-jiff only.
impl ValueType for Date
Available on crate feature
with-jiff only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for DateTime
Available on crate feature with-jiff only.
impl ValueType for DateTime
Available on crate feature
with-jiff only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Time
Available on crate feature with-jiff only.
impl ValueType for Time
Available on crate feature
with-jiff only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Vector
Available on crate feature postgres-vector only.
impl ValueType for Vector
Available on crate feature
postgres-vector only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Date
Available on crate feature with-time only.
impl ValueType for Date
Available on crate feature
with-time only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Time
Available on crate feature with-time only.
impl ValueType for Time
Available on crate feature
with-time only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Braced
Available on crate feature with-uuid only.
impl ValueType for Braced
Available on crate feature
with-uuid only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Hyphenated
Available on crate feature with-uuid only.
impl ValueType for Hyphenated
Available on crate feature
with-uuid only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Simple
Available on crate feature with-uuid only.
impl ValueType for Simple
Available on crate feature
with-uuid only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl ValueType for Urn
Available on crate feature with-uuid only.
impl ValueType for Urn
Available on crate feature
with-uuid only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl<T> ValueType for Vec<Option<T>>
Available on crate feature postgres-array only.
impl<T> ValueType for Vec<Option<T>>
Available on crate feature
postgres-array only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Sourceยงimpl<T> ValueType for Vec<T>
Available on crate feature postgres-array only.
impl<T> ValueType for Vec<T>
Available on crate feature
postgres-array only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Implementorsยง
impl ValueType for IpNetwork
Available on crate feature
with-ipnetwork only.impl ValueType for Json
Available on crate feature
with-json only.impl ValueType for RangeType
Available on crate feature
postgres-range only.impl ValueType for BigDecimal
Available on crate feature
with-bigdecimal only.impl ValueType for sea_query::value::prelude::DateTime<FixedOffset>
Available on crate feature
with-chrono only.impl ValueType for sea_query::value::prelude::DateTime<Local>
Available on crate feature
with-chrono only.impl ValueType for sea_query::value::prelude::DateTime<Utc>
Available on crate feature
with-chrono only.impl ValueType for Decimal
Available on crate feature
with-rust_decimal only.impl ValueType for MacAddress
Available on crate feature
with-mac_address only.impl ValueType for NaiveDate
Available on crate feature
with-chrono only.impl ValueType for NaiveDateTime
Available on crate feature
with-chrono only.impl ValueType for NaiveTime
Available on crate feature
with-chrono only.impl ValueType for OffsetDateTime
Available on crate feature
with-time only.impl ValueType for PrimitiveDateTime
Available on crate feature
with-time only.impl ValueType for Timestamp
Available on crate feature
with-jiff only.impl ValueType for Uuid
Available on crate feature
with-uuid only.