Trait mz_repr::DatumType

source ·
pub trait DatumType<'a, E>: Sized {
    fn nullable() -> 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§

Whether this Rust type can represent NULL values

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.

Convert this Rust type into a Result containing a Datum, or an error

Implementations on Foreign Types§