pub trait ValueType: Sized {
fn try_from(v: Value) -> Result<Self, ValueTypeErr>;
fn type_name() -> String;
fn array_type() -> ArrayType;
fn column_type() -> ColumnType;
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ยง
Implementations on Foreign Typesยง
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 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 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 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<T> ValueType for Option<T>where
T: ValueType + Nullable,
impl<T> ValueType for Option<T>where
T: ValueType + Nullable,
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 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 Json
Available on crate feature with-json
only.
impl ValueType for Json
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 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 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 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 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 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<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 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 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 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 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 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 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 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 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<T> ValueType for Vec<T>where
T: NotU8 + ValueType,
Available on crate feature postgres-array
only.
impl<T> ValueType for Vec<T>where
T: NotU8 + ValueType,
Available on crate feature
postgres-array
only.