pub trait Main {
Show 13 methods fn key() -> Result<String, Box<dyn Error>>; fn custom_default_to_json_val() -> Result<Value, Box<dyn Error>>
    where
        Self: DeserializeOwned + Sized
; fn generate_metadata() -> Result<(Meta, Value), Box<dyn Error>>
    where
        Self: DeserializeOwned + Sized
; fn hash(&self) -> String; fn set_hash(&mut self, value: String); fn obj_id(&self) -> Result<Option<ObjectId>, Box<dyn Error>>; fn set_obj_id(&mut self, object_id: ObjectId); fn created_at(&self) -> String; fn set_created_at(&mut self, value: String); fn updated_at(&self) -> String; fn set_updated_at(&mut self, value: String); fn self_to_json_val(&self) -> Result<Value, Box<dyn Error>>; fn injection(
        project_name: &str,
        unique_project_key: &str,
        collection_name: &str,
        client: &Client,
        model_json: &mut Value,
        fields_name: &Vec<String>
    ) -> Result<(), Box<dyn Error>>
    where
        Self: DeserializeOwned + Sized
, { ... }
}
Expand description

Model options and field type map for Form.

Required Methods

Get model key ( to access model metadata in cache ).

Model instance from create method, convert to intermediate state serde_json::value::Value, with the addition of Html-ID and data validation.

Generate metadata of Model.

Getter and Setter for field hash.

ObjectId from hash field.

ObjectId to hash field.

Getter and Setter for field created_at.

Getter and Setter for field updated_at.

Serializing the model instance to serde_json::Value format.

Provided Methods

Enrich field type map with values for dynamic fields type.

Implementors