Expand description
Components of a JSON API document.
Structs§
- Error
Object - Contains information about problems encountered while performing an operation.
- Error
Source - References to the source of the error.
- Identifier
- Identifies an individual resource. Commonly found in an object’s relationships.
- JsonApi
- Information about this implementation of the specification.
- Link
- A data structure containing a URL. Can be deserialized from either a string or link object.
- NewObject
- A resource that does not already exist. Commonly found in the document of a
POST
request. - Object
- A preexisting resource. Commonly found in the document of a response or
PATCH
request. - Relationship
- Represents a resource’s relationship to another.
Enums§
- Data
- Describes the data of a document or resource linkage.
- Document
- Represents a compound JSON API document.
- Version
- The version of the specification.
Traits§
- Primary
Data - A marker trait used to indicate that a type can be the primary data for a document.
Functions§
- from_
doc - Interpret a
Document<T>
as a typeU
. - from_
reader - Deserialize a
Document<T>
from an IO stream of JSON text and then iterpret it as a typeU
. - from_
slice - Deserialize a
Document<T>
from bytes of JSON text and then iterpret it as a typeU
. - from_
str - Deserialize a
Document<T>
from a string of JSON text and then iterpret it as a typeU
. - to_doc
- Render type
T
as aDocument<U>
. - to_
string - Render type
T
as aDocument<U>
and then serialize it as a string of JSON. - to_
string_ pretty - Render type
T
as aDocument<U>
and then serialize it as a pretty-printed string of JSON. - to_vec
- Render type
T
as aDocument<U>
and then serialize it as a JSON byte vector. - to_
vec_ pretty - Render type
T
as aDocument<U>
and then serialize it as a pretty-printed JSON byte vector. - to_
writer - Render type
T
as aDocument<U>
and then serialize it as JSON into the IO stream. - to_
writer_ pretty - Render type
T
as aDocument<U>
and then serialize it as pretty-printed JSON into the IO stream.