Model

Trait Model 

Source
pub trait Model {
    // Required methods
    fn attrs(&self) -> &HashMap<String, Value>;
    fn groups(&self) -> &[Group];

    // Provided methods
    fn attr(&self, name: &str) -> Option<&Value> { ... }
    fn kind_groups(&self, kind: &str) -> impl IntoIterator<Item = &Group> { ... }
}

Required Methods§

Source

fn attrs(&self) -> &HashMap<String, Value>

Source

fn groups(&self) -> &[Group]

Provided Methods§

Source

fn attr(&self, name: &str) -> Option<&Value>

Source

fn kind_groups(&self, kind: &str) -> impl IntoIterator<Item = &Group>

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§