Skip to main content

Model

Trait Model 

Source
pub trait Model:
    Default
    + Serialize
    + DeserializeOwned {
    // Provided methods
    fn new() -> Self { ... }
    fn read_json_map(&mut self, data: &JsonMap) -> Validation { ... }
}

Provided Methods§

Source

fn new() -> Self

创建实例对象

Source

fn read_json_map(&mut self, data: &JsonMap) -> Validation

使用 JsonMap对象更新模型,并且返回一个 Validation结果.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§