[−][src]Trait jsonapi::model::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.
Provided methods
fn from_jsonapi_resource(
resource: &Resource,
included: &Option<Resources>
) -> Result<Self>
resource: &Resource,
included: &Option<Resources>
) -> Result<Self>
fn from_jsonapi_document(doc: &JsonApiDocument) -> Result<Self>
fn to_jsonapi_resource(&self) -> (Resource, Option<Resources>)
fn to_jsonapi_document(&self) -> JsonApiDocument
Implementations on Foreign Types
impl<M: JsonApiModel> JsonApiModel for Box<M>
[src]
fn jsonapi_type(&self) -> String
[src]
fn jsonapi_id(&self) -> String
[src]
fn relationship_fields() -> Option<&'static [&'static str]>
[src]
fn build_relationships(&self) -> Option<Relationships>
[src]
fn build_included(&self) -> Option<Resources>
[src]
fn from_jsonapi_resource(
resource: &Resource,
included: &Option<Resources>
) -> Result<Self>
[src]
resource: &Resource,
included: &Option<Resources>
) -> Result<Self>