pub trait Entity:
Clone
+ Default
+ Send
+ Sync
+ 'static {
Show 15 methods
// Required method
fn object_converter() -> Box<dyn TypeConverter<Self, Row> + Send + Sync>;
// Provided methods
fn is_dictionary() -> bool { ... }
fn payload(&self, name: &str) -> Vec<Row> ⓘ { ... }
fn set_payload(&mut self, name: &str, rows: Vec<Row>) -> Result<()> { ... }
fn related<R: Entity>(&self, name: &str) -> Vec<R> { ... }
fn set_related<R: Entity>(
&mut self,
name: &str,
items: Vec<R>,
) -> Result<()> { ... }
fn set_one<R: Entity>(&mut self, name: &str, item: R) -> Result<()> { ... }
fn cell(&self, name: &str) -> Option<Value> { ... }
fn set_cell(&mut self, name: &str, value: Value) -> Result<()> { ... }
fn has(&self, name: &str) -> bool { ... }
fn schema_list<R: SchemaObject>(&self, name: &str) -> Vec<R> { ... }
fn set_schema_list<R: SchemaObject>(
&mut self,
name: &str,
items: Vec<R>,
) -> Result<()> { ... }
fn set_schema_one<R: SchemaObject>(
&mut self,
name: &str,
item: R,
) -> Result<()> { ... }
fn collect_list<P: Entity>(parent: &P, name: &str) -> Vec<Self>
where Self: Sized { ... }
fn install_list<P: Entity>(
parent: &mut P,
name: &str,
items: Vec<Self>,
) -> Result<()>
where Self: Sized { ... }
}Required Methods§
fn object_converter() -> Box<dyn TypeConverter<Self, Row> + Send + Sync>
Provided Methods§
fn is_dictionary() -> bool
fn payload(&self, name: &str) -> Vec<Row> ⓘ
fn set_payload(&mut self, name: &str, rows: Vec<Row>) -> Result<()>
fn set_one<R: Entity>(&mut self, name: &str, item: R) -> Result<()>
fn cell(&self, name: &str) -> Option<Value>
fn set_cell(&mut self, name: &str, value: Value) -> Result<()>
fn has(&self, name: &str) -> bool
fn schema_list<R: SchemaObject>(&self, name: &str) -> Vec<R>
fn set_schema_list<R: SchemaObject>( &mut self, name: &str, items: Vec<R>, ) -> Result<()>
fn set_schema_one<R: SchemaObject>(&mut self, name: &str, item: R) -> Result<()>
fn collect_list<P: Entity>(parent: &P, name: &str) -> Vec<Self>where
Self: Sized,
fn install_list<P: Entity>(
parent: &mut P,
name: &str,
items: Vec<Self>,
) -> Result<()>where
Self: Sized,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".