Skip to main content

DynEntity

Trait DynEntity 

Source
pub trait DynEntity<S: Database>
where Self: Send + Sync,
{ // 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§

Source

fn into_insert(&self, from: &Value, insert: &mut InsertStOne<'_, S>)

Source

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

Source

fn into_buffer( &self, from: &Value, buffer: &mut <S as HasArguments<'_>>::Arguments, ) -> Result<(), Error>

Source

fn from_row_scoped(&self, row: &S::Row) -> Result<Value, Error>

Source

fn from_row(&self, row: &S::Row, into: &mut Value) -> Result<(), Error>

👎Deprecated:

use from_row2

Source

fn members(&self) -> Vec<&'static str>

Source

fn clone_self(&self) -> Box<dyn DynEntity<S>>

Provided Methods§

Source

fn resolve_name_conflict(&self, all: &Vec<&'static str>) -> Result<(), ()>

Source

fn on_select(&self, st: &mut SelectSt<S, QuickQuery<'_>>)

Source

fn on_select_scoped(&self, st: &mut SelectSt<S, QuickQuery<'_>>)

Source

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".

Implementors§

Source§

impl<S, T> DynEntity<S> for EntityPhantom<T>
where S: Database + SupportNamedBind + Sync + Send, T: Entity<S> + Send + Sync + 'static + for<'q> IntoMutArguments<'q, S> + for<'d> Deserialize<'d> + Serialize,