Module jsonapi_rs::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
- A hash map implemented with quadratic probing and SIMD lookup.
Traits
- A trait for any struct that can be converted from/into a
Resource
. The only requirement is that your struct has anid: String
field. You shouldn’t be implementing JsonApiModel manually, look at thejsonapi_model!
macro instead.
Functions
- Converts a
vec!
of structs into aJsonApiDocument
- Converts a
vec!
of structs intoResources