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§
Traits§
- Json
ApiModel - 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§
- vec_
to_ jsonapi_ document - Converts a
vec!
of structs into aJsonApiDocument
- vec_
to_ jsonapi_ resources - Converts a
vec!
of structs intoResources