Trait BpsvRowOps

Source
pub trait BpsvRowOps {
    // Required methods
    fn len(&self) -> usize;
    fn get_raw(&self, index: usize) -> Option<&str>;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn get_raw_by_name(
        &self,
        field_name: &str,
        schema: &BpsvSchema,
    ) -> Option<&str> { ... }
    fn to_map(&self, schema: &BpsvSchema) -> Result<HashMap<String, String>> { ... }
}
Expand description

Common functionality for BPSV row types

Required Methods§

Source

fn len(&self) -> usize

Get the number of values in this row

Source

fn get_raw(&self, index: usize) -> Option<&str>

Get a raw string value by index

Provided Methods§

Source

fn is_empty(&self) -> bool

Check if the row is empty

Source

fn get_raw_by_name(&self, field_name: &str, schema: &BpsvSchema) -> Option<&str>

Get a raw string value by field name using the schema

Source

fn to_map(&self, schema: &BpsvSchema) -> Result<HashMap<String, String>>

Convert row to a map of field names to raw values

Implementors§