Module doc

Source
Expand description

Components of a JSON API document.

Structs§

ErrorObject
Contains information about problems encountered while performing an operation.
ErrorSource
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§

PrimaryData
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 type U.
from_reader
Deserialize a Document<T> from an IO stream of JSON text and then iterpret it as a type U.
from_slice
Deserialize a Document<T> from bytes of JSON text and then iterpret it as a type U.
from_str
Deserialize a Document<T> from a string of JSON text and then iterpret it as a type U.
to_doc
Render type T as a Document<U>.
to_string
Render type T as a Document<U> and then serialize it as a string of JSON.
to_string_pretty
Render type T as a Document<U> and then serialize it as a pretty-printed string of JSON.
to_vec
Render type T as a Document<U> and then serialize it as a JSON byte vector.
to_vec_pretty
Render type T as a Document<U> and then serialize it as a pretty-printed JSON byte vector.
to_writer
Render type T as a Document<U> and then serialize it as JSON into the IO stream.
to_writer_pretty
Render type T as a Document<U> and then serialize it as pretty-printed JSON into the IO stream.