pub trait DatumType<'a, E>: Sized {
// Required methods
fn nullable() -> bool;
fn fallible() -> bool;
fn try_from_result(
res: Result<Datum<'a>, E>,
) -> Result<Self, Result<Datum<'a>, E>>;
fn into_result(self, temp_storage: &'a RowArena) -> Result<Datum<'a>, E>;
}
Expand description
A bridge between native Rust types and SQL runtime types represented in Datums
Required Methods§
sourcefn try_from_result(
res: Result<Datum<'a>, E>,
) -> Result<Self, Result<Datum<'a>, E>>
fn try_from_result( res: Result<Datum<'a>, E>, ) -> Result<Self, Result<Datum<'a>, E>>
Try to convert a Result whose Ok variant is a Datum into this native Rust type (Self). If it fails the error variant will contain the original result.
sourcefn into_result(self, temp_storage: &'a RowArena) -> Result<Datum<'a>, E>
fn into_result(self, temp_storage: &'a RowArena) -> Result<Datum<'a>, E>
Convert this Rust type into a Result containing a Datum, or an error
Object Safety§
This trait is not object safe.