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§
fn new(type_name: &'static str) -> Selfwhere
Self: Sized,
fn new_with_inner(
type_name: &'static str,
inner_type_name: &'static str,
) -> Selfwhere
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)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".