Trait mango_orm::models::ToModel[][src]

pub trait ToModel: HtmlControls + AdditionalValidation + ValidationModel {
    fn key() -> String;
fn meta() -> Result<Meta, Box<dyn Error>>;
fn widgets() -> Result<HashMap<String, Widget>, Box<dyn Error>>;
fn get_hash(&self) -> Option<String>;
fn set_hash(&mut self, value: String);
fn self_to_json(&self) -> Result<Value, Box<dyn Error>>; fn hash_to_id(hash: &str) -> Result<ObjectId, Box<dyn Error>> { ... }
fn id_to_hash(id: ObjectId) -> String { ... }
fn vitaminize(
        project_name: &str,
        unique_project_key: &str,
        collection_name: &str,
        client: &Client,
        map_widgets: &mut HashMap<String, Widget>
    ) -> Result<(), Box<dyn Error>> { ... } }

Required methods

fn key() -> String[src]

fn meta() -> Result<Meta, Box<dyn Error>>[src]

fn widgets() -> Result<HashMap<String, Widget>, Box<dyn Error>>[src]

fn get_hash(&self) -> Option<String>[src]

fn set_hash(&mut self, value: String)[src]

fn self_to_json(&self) -> Result<Value, Box<dyn Error>>[src]

Loading content...

Provided methods

fn hash_to_id(hash: &str) -> Result<ObjectId, Box<dyn Error>>[src]

fn id_to_hash(id: ObjectId) -> String[src]

fn vitaminize(
    project_name: &str,
    unique_project_key: &str,
    collection_name: &str,
    client: &Client,
    map_widgets: &mut HashMap<String, Widget>
) -> Result<(), Box<dyn Error>>
[src]

Loading content...

Implementors

Loading content...