pub trait ValueType: Sized {
fn try_from(v: Value) -> Result<Self, ValueTypeErr>;
fn type_name() -> String;
fn column_type() -> ColumnType;
fn unwrap(v: Value) -> Self { ... }
}
Required Methods
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn column_type() -> ColumnType
Provided Methods
Implementations on Foreign Types
sourceimpl ValueType for bool
impl ValueType for bool
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for i8
impl ValueType for i8
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for i16
impl ValueType for i16
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for i32
impl ValueType for i32
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for i64
impl ValueType for i64
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for u8
impl ValueType for u8
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for u16
impl ValueType for u16
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for u32
impl ValueType for u32
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for u64
impl ValueType for u64
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for f32
impl ValueType for f32
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for f64
impl ValueType for f64
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl<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 column_type() -> ColumnType
sourceimpl ValueType for Vec<u8>
impl ValueType for Vec<u8>
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for String
impl ValueType for String
fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for Json
This is supported on crate feature with-json
only.
impl ValueType for Json
This is supported on crate feature
with-json
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for NaiveDate
This is supported on crate feature with-chrono
only.
impl ValueType for NaiveDate
This is supported on crate feature
with-chrono
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for NaiveTime
This is supported on crate feature with-chrono
only.
impl ValueType for NaiveTime
This is supported on crate feature
with-chrono
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for NaiveDateTime
This is supported on crate feature with-chrono
only.
impl ValueType for NaiveDateTime
This is supported on crate feature
with-chrono
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for DateTime<Utc>
This is supported on crate feature with-chrono
only.
impl ValueType for DateTime<Utc>
This is supported on crate feature
with-chrono
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for DateTime<Local>
This is supported on crate feature with-chrono
only.
impl ValueType for DateTime<Local>
This is supported on crate feature
with-chrono
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for DateTime<FixedOffset>
This is supported on crate feature with-chrono
only.
impl ValueType for DateTime<FixedOffset>
This is supported on crate feature
with-chrono
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for Date
This is supported on crate feature with-time
only.
impl ValueType for Date
This is supported on crate feature
with-time
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for Time
This is supported on crate feature with-time
only.
impl ValueType for Time
This is supported on crate feature
with-time
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for PrimitiveDateTime
This is supported on crate feature with-time
only.
impl ValueType for PrimitiveDateTime
This is supported on crate feature
with-time
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for OffsetDateTime
This is supported on crate feature with-time
only.
impl ValueType for OffsetDateTime
This is supported on crate feature
with-time
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for Decimal
This is supported on crate feature with-rust_decimal
only.
impl ValueType for Decimal
This is supported on crate feature
with-rust_decimal
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for BigDecimal
This is supported on crate feature with-bigdecimal
only.
impl ValueType for BigDecimal
This is supported on crate feature
with-bigdecimal
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl ValueType for Uuid
This is supported on crate feature with-uuid
only.
impl ValueType for Uuid
This is supported on crate feature
with-uuid
only.fn try_from(v: Value) -> Result<Self, ValueTypeErr>
fn type_name() -> String
fn column_type() -> ColumnType
sourceimpl<T> ValueType for Vec<T> where
T: NotU8 + ValueType,
This is supported on crate feature postgres-array
only.
impl<T> ValueType for Vec<T> where
T: NotU8 + ValueType,
This is supported on crate feature
postgres-array
only.