pub trait DynEntity<S: Database>{
// Required methods
fn into_insert(&self, from: &Value, insert: &mut InsertStOne<'_, S>);
fn table_name(&self) -> &'static str;
fn into_buffer(
&self,
from: &Value,
buffer: &mut <S as HasArguments<'_>>::Arguments,
) -> Result<(), Error>;
fn from_row_scoped(&self, row: &S::Row) -> Result<Value, Error>;
fn from_row(&self, row: &S::Row, into: &mut Value) -> Result<(), Error>;
fn members(&self) -> Vec<&'static str>;
fn clone_self(&self) -> Box<dyn DynEntity<S>>;
// Provided methods
fn resolve_name_conflict(&self, all: &Vec<&'static str>) -> Result<(), ()> { ... }
fn on_select(&self, st: &mut SelectSt<S, QuickQuery<'_>>)
where S: SupportNamedBind { ... }
fn on_select_scoped(&self, st: &mut SelectSt<S, QuickQuery<'_>>)
where S: SupportNamedBind { ... }
fn from_row2(&self, row: &S::Row) -> Result<Value, Error> { ... }
}Required Methods§
fn into_insert(&self, from: &Value, insert: &mut InsertStOne<'_, S>)
fn table_name(&self) -> &'static str
fn into_buffer( &self, from: &Value, buffer: &mut <S as HasArguments<'_>>::Arguments, ) -> Result<(), Error>
fn from_row_scoped(&self, row: &S::Row) -> Result<Value, Error>
fn from_row(&self, row: &S::Row, into: &mut Value) -> Result<(), Error>
👎Deprecated:
use from_row2
fn members(&self) -> Vec<&'static str>
fn clone_self(&self) -> Box<dyn DynEntity<S>>
Provided Methods§
fn resolve_name_conflict(&self, all: &Vec<&'static str>) -> Result<(), ()>
fn on_select(&self, st: &mut SelectSt<S, QuickQuery<'_>>)where
S: SupportNamedBind,
fn on_select_scoped(&self, st: &mut SelectSt<S, QuickQuery<'_>>)where
S: SupportNamedBind,
fn from_row2(&self, row: &S::Row) -> Result<Value, Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".