pub trait Model:
Debug
+ Clone
+ DeserializeOwned
+ Serialize {
// Required methods
fn ident() -> &'static str;
fn plural_ident() -> &'static str;
fn support_update_columns() -> bool;
fn owner(&self) -> &str;
fn name(&self) -> &str;
// Provided method
fn id(&self) -> String { ... }
}
Required Methods§
Sourcefn plural_ident() -> &'static str
fn plural_ident() -> &'static str
Models identifier, used for splicing URLs.
Sourcefn support_update_columns() -> bool
fn support_update_columns() -> bool
Indicate whether this model currently supports updating individual columns one by one.
fn owner(&self) -> &str
fn name(&self) -> &str
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.