Trait Model

Source
pub trait Model<M: Model<M>> {
    type K: Copy + Eq + Hash + Serialize + for<'a> Deserialize<'a>;

    // Required method
    fn id(&self) -> M::K;

    // Provided method
    fn vec_to_map(data: Vec<M>) -> FxHashMap<M::K, M> { ... }
}

Required Associated Types§

Source

type K: Copy + Eq + Hash + Serialize + for<'a> Deserialize<'a>

Required Methods§

Source

fn id(&self) -> M::K

Provided Methods§

Source

fn vec_to_map(data: Vec<M>) -> FxHashMap<M::K, M>

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§