pub trait Model:
Clone
+ Send
+ Sync
+ 'static {
Show 14 methods
// Required methods
fn table() -> Table;
fn fields() -> Vec<Field>;
fn write(&self, w: &mut dyn Writer);
fn read(r: &mut dyn Reader) -> Result<Self, StoreError>;
fn write_id(&self, w: &mut dyn Writer);
fn read_id(&mut self, r: &mut dyn Reader) -> Result<(), StoreError>;
// Provided methods
fn columns() -> Vec<Name> { ... }
fn search() -> Vec<Name> { ... }
fn readonly() -> Vec<Name> { ... }
fn actions() -> Vec<Action> { ... }
fn schema() -> Schema { ... }
fn spec() -> Schema { ... }
fn row(&self) -> Vec<Value> { ... }
fn id(&self) -> Value { ... }
}Expand description
A domain type mapped to a store table.
Required Methods§
Sourcefn read(r: &mut dyn Reader) -> Result<Self, StoreError>
fn read(r: &mut dyn Reader) -> Result<Self, StoreError>
Read a new value from the given reader.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".