pub trait JsonApiArray<M> {
    // Required methods
    fn get_models(&self) -> &[M];
    fn get_models_mut(&mut self) -> &mut [M];
}
Expand description

Trait which allows a has many relationship to be optional.

Required Methods§

source

fn get_models(&self) -> &[M]

source

fn get_models_mut(&mut self) -> &mut [M]

Implementations on Foreign Types§

source§

impl<M: JsonApiModel> JsonApiArray<M> for Option<Vec<M>>

source§

fn get_models(&self) -> &[M]

source§

fn get_models_mut(&mut self) -> &mut [M]

source§

impl<M: JsonApiModel> JsonApiArray<M> for Vec<M>

source§

fn get_models(&self) -> &[M]

source§

fn get_models_mut(&mut self) -> &mut [M]

Implementors§