pub trait Main {
Show 13 methods fn key() -> Result<String, Box<dyn Error>>; fn meta() -> Result<Meta, Box<dyn Error>>; fn widgets() -> Result<HashMap<String, Widget>, Box<dyn Error>>; fn get_hash(&self) -> String; fn set_hash(&mut self, value: String); fn get_created_at(&self) -> String; fn set_created_at(&mut self, value: String); fn get_updated_at(&self) -> String; fn set_updated_at(&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(object_id: ObjectId) -> String { ... } fn vitaminize(
        project_name: &str,
        unique_project_key: &str,
        collection_name: &str,
        client: &Client,
        widget_map: &mut HashMap<String, Widget>
    ) -> Result<(), Box<dyn Error>> { ... }
}
Expand description

Model options and widget map for Form.

Required Methods

Get model key ( to access data in the cache )

Get metadata of Model.

Get map of widgets for model fields. Hint: <field name, Widget>

Getter and Setter for field hash.

Getter and Setter for field created_at.

Getter and Setter for field updated_at.

Serialize an instance of the Model to a hash-line.

Provided Methods

Convert hash-line to MongoDB ID.

Convert MongoDB ID to hash-line.

Enrich the widget map with values for dynamic widgets.

Implementors