Data

Trait Data 

Source
pub trait Data {
Show 15 methods // Required methods fn new(type_name: &'static str) -> Self where Self: Sized; fn new_with_inner( type_name: &'static str, inner_type_name: &'static str, ) -> Self where Self: Sized; fn type_name(&self) -> &'static str; fn inner_type_name(&self) -> Option<&'static str>; fn rows(&self) -> &DataMap; fn rows_mut(&mut self) -> &mut DataMap; fn into_rows(self) -> DataMap; // Provided methods fn has_inner_type(&self) -> bool { ... } fn all_ids(&self) -> Vec<&String> { ... } fn all_ids_sorted(&self) -> Value { ... } fn contains(&self, id: &str) -> bool { ... } fn get(&self, id: &str) -> Option<&DataRow> { ... } fn get_mut(&mut self, id: &str) -> Option<&mut DataRow> { ... } fn insert_row(&mut self, id: &str, row: DataRow) { ... } fn insert_row_value(&mut self, id: &str, key: &str, value: Value) { ... }
}

Required Methods§

Source

fn new(type_name: &'static str) -> Self
where Self: Sized,

Source

fn new_with_inner( type_name: &'static str, inner_type_name: &'static str, ) -> Self
where Self: Sized,

Source

fn type_name(&self) -> &'static str

Source

fn inner_type_name(&self) -> Option<&'static str>

Source

fn rows(&self) -> &DataMap

Source

fn rows_mut(&mut self) -> &mut DataMap

Source

fn into_rows(self) -> DataMap

Provided Methods§

Source

fn has_inner_type(&self) -> bool

Source

fn all_ids(&self) -> Vec<&String>

Source

fn all_ids_sorted(&self) -> Value

Source

fn contains(&self, id: &str) -> bool

Source

fn get(&self, id: &str) -> Option<&DataRow>

Source

fn get_mut(&mut self, id: &str) -> Option<&mut DataRow>

Source

fn insert_row(&mut self, id: &str, row: DataRow)

Source

fn insert_row_value(&mut self, id: &str, key: &str, value: Value)

Implementors§