pub enum Document<T: PrimaryData> {
Ok {
data: Data<T>,
included: Set<Object>,
jsonapi: JsonApi,
links: Map<Key, Link>,
meta: Map,
},
Err {
errors: Vec<ErrorObject>,
jsonapi: JsonApi,
links: Map<Key, Link>,
meta: Map,
},
}
Expand description
Represents a compound JSON API document.
For more information, check out the document structure section of the JSON API specification.
Variants§
Ok
Does not contain errors.
Fields
data: Data<T>
The primary data of the document. For more information, check out the top level section of the JSON API specification.
included: Set<Object>
Included resources, resolved from the include
query parameter of a client
request.
jsonapi: JsonApi
Information about this implementation of the specification that the document was created with. For more information, check out the JSON API object section of the JSON API specification.
links: Map<Key, Link>
Contains relevant links. If this value of this field is empty, it will not be serialized. For more information, check out the links section of the JSON API specification.
meta: Map
Non-standard meta information. If this value of this field is empty, it will not be serialized. For more information, check out the meta information section of the JSON API specification.
Err
Contains 1 or more error(s).