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>> {
// Required method
fn is_null(&self) -> bool;
// Provided method
fn try_into<'de, T>(self) -> Result<T, DeserializationError>
where T: Deserialize<'de> { ... }
}
Expand description
Provides the conversion of a database value into a standard rust type.
Required Methods§
Provided Methods§
sourcefn try_into<'de, T>(self) -> Result<T, DeserializationError>where
T: Deserialize<'de>,
fn try_into<'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.