casdoor_sdk_rust

Trait Model

Source
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§

Source

fn ident() -> &'static str

Model identifier, used for splicing URLs.

Source

fn plural_ident() -> &'static str

Models identifier, used for splicing URLs.

Source

fn support_update_columns() -> bool

Indicate whether this model currently supports updating individual columns one by one.

Source

fn owner(&self) -> &str

Source

fn name(&self) -> &str

Provided Methods§

Source

fn id(&self) -> String

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.

Implementors§