Module model

Source
Expand description

Defines the JsonApiModel trait. This is primarily used in conjunction with the jsonapi_model! macro to allow arbitrary structs which implement Deserialize to be converted to/from a JsonApiDocument or Resource

Re-exports§

pub use crate::api::*;

Structs§

HashMap
A hash map implemented with quadratic probing and SIMD lookup.

Traits§

JsonApiModel
A trait for any struct that can be converted from/into a Resource. The only requirement is that your struct has an id: String field. You shouldn’t be implementing JsonApiModel manually, look at the jsonapi_model! macro instead.

Functions§

vec_to_jsonapi_document
Converts a vec! of structs into a JsonApiDocument
vec_to_jsonapi_resources
Converts a vec! of structs into Resources