RowLike

Trait RowLike 

Source
pub trait RowLike {
    // Required methods
    fn get_by_name(&self, n: &str) -> Result<ValueRef<'_>>;
    fn check_max_len(&self, l: usize) -> Result<()>;
}
Expand description

Row data, that can be archived

Required Methods§

Source

fn get_by_name(&self, n: &str) -> Result<ValueRef<'_>>

Get an individual data value, by its field name

Source

fn check_max_len(&self, l: usize) -> Result<()>

Check that the supplied data has at most l fields

If self has more than l fields, returns an error. If it has no more than l, returns Ok(()).

Used by TableArchiver::write_row to check that it has really archived all the data in the row.

Implementations on Foreign Types§

Source§

impl RowLike for HashMap<&str, ValueRef<'_>>

Source§

fn get_by_name(&self, n: &str) -> Result<ValueRef<'_>>

Source§

fn check_max_len(&self, l: usize) -> Result<()>

Source§

impl RowLike for Row<'_>

Source§

fn get_by_name(&self, n: &str) -> Result<ValueRef<'_>>

Source§

fn check_max_len(&self, l: usize) -> Result<()>

Implementors§