[][src]Trait serde_db::de::DbValue

pub trait DbValue: Sized + DbValueInto<bool> + DbValueInto<u8> + DbValueInto<u16> + DbValueInto<u32> + DbValueInto<u64> + DbValueInto<i8> + DbValueInto<i16> + DbValueInto<i32> + DbValueInto<i64> + DbValueInto<f32> + DbValueInto<f64> + DbValueInto<String> + DbValueInto<Vec<u8>> {
    fn is_null(&self) -> bool;

    fn into_typed<'de, T>(self) -> Result<T, DeserializationError>
    where
        T: Deserialize<'de>
, { ... } }

Provides the conversion of a database value into a standard rust type.

Required methods

fn is_null(&self) -> bool

Returns true if this is a NULL value.

Loading content...

Provided methods

fn into_typed<'de, T>(self) -> Result<T, DeserializationError> where
    T: Deserialize<'de>, 

Converts the DbValue into a plain rust value.

The generic implementation of this method is based on to-be-provided implementations of the target-type-specific trait DbValueInto.

Errors

DeserializationError if the value cannot be converted into the target type.

Loading content...

Implementors

Loading content...