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 { ... }
}
Required Methodsยง
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn array_type() -> ArrayType
fn column_type() -> ColumnType
Provided Methodsยง
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
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 IpNetwork
Available on crate feature with-ipnetwork
only.
impl ValueType for IpNetwork
Available on crate feature
with-ipnetwork
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 Value
Available on crate feature with-json
only.
impl ValueType for Value
Available on crate feature
with-json
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 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 BigDecimal
Available on crate feature with-bigdecimal
only.
impl ValueType for BigDecimal
Available on crate feature
with-bigdecimal
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<FixedOffset>
Available on crate feature with-chrono
only.
impl ValueType for DateTime<FixedOffset>
Available on crate feature
with-chrono
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<Local>
Available on crate feature with-chrono
only.
impl ValueType for DateTime<Local>
Available on crate feature
with-chrono
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<Utc>
Available on crate feature with-chrono
only.
impl ValueType for DateTime<Utc>
Available on crate feature
with-chrono
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 NaiveDate
Available on crate feature with-chrono
only.
impl ValueType for NaiveDate
Available on crate feature
with-chrono
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 NaiveDateTime
Available on crate feature with-chrono
only.
impl ValueType for NaiveDateTime
Available on crate feature
with-chrono
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 NaiveTime
Available on crate feature with-chrono
only.
impl ValueType for NaiveTime
Available on crate feature
with-chrono
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 MacAddress
Available on crate feature with-mac_address
only.
impl ValueType for MacAddress
Available on crate feature
with-mac_address
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 Decimal
Available on crate feature with-rust_decimal
only.
impl ValueType for Decimal
Available on crate feature
with-rust_decimal
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 OffsetDateTime
Available on crate feature with-time
only.
impl ValueType for OffsetDateTime
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 PrimitiveDateTime
Available on crate feature with-time
only.
impl ValueType for PrimitiveDateTime
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 ValueType for Uuid
Available on crate feature with-uuid
only.
impl ValueType for Uuid
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 Option<T>
impl<T> ValueType for Option<T>
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.