Trait mz_repr::fixed_length::FromDatumIter

source ·
pub trait FromDatumIter: Sized + Default {
    // Required methods
    fn from_datum_iter<'a, I, D>(&mut self, datum_iter: I) -> Self
       where I: IntoIterator<Item = D>,
             D: Borrow<Datum<'a>>;
    fn try_from_datum_iter<'a, I, D, E>(
        &mut self,
        datum_iter: I
    ) -> Result<Self, E>
       where I: IntoIterator<Item = Result<D, E>>,
             D: Borrow<Datum<'a>>;
}
Expand description

A helper trait to construct target values from input Row instances.

Required Methods§

source

fn from_datum_iter<'a, I, D>(&mut self, datum_iter: I) -> Self
where I: IntoIterator<Item = D>, D: Borrow<Datum<'a>>,

Obtains an instance of Self' given an iterator of borrowed datums and a schema provided by types`.

source

fn try_from_datum_iter<'a, I, D, E>(&mut self, datum_iter: I) -> Result<Self, E>
where I: IntoIterator<Item = Result<D, E>>, D: Borrow<Datum<'a>>,

Obtains an instance of Self' given an iterator of results of borrowed datums and a schema provided by types`.

In the case the iterator produces an error, the pushing of datums is terminated and the error returned.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromDatumIter for ()

source§

fn from_datum_iter<'a, I, D>(&mut self, datum_iter: I) -> Self
where I: IntoIterator<Item = D>, D: Borrow<Datum<'a>>,

Obtains a unit value from an empty datum iterator.

source§

fn try_from_datum_iter<'a, I, D, E>(&mut self, datum_iter: I) -> Result<Self, E>
where I: IntoIterator<Item = Result<D, E>>, D: Borrow<Datum<'a>>,

Obtains a unit value from an empty iterator of results of datums.

Implementors§