Enum json_api::Document [] [src]

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,
    },
}

Represents a compound JSON API document.

For more information, check out the document structure section of the JSON API specification.

Variants

Does not contain errors.

Contains 1 or more error(s).

Methods

impl<T: PrimaryData> Document<T>
[src]

[src]
[]

Returns true if the document does not contain any errors.

[src]
[]

Returns true if the document contains 1 or more error(s).

Trait Implementations

impl<T: Clone + PrimaryData> Clone for Document<T>
[src]

[src]
[]

Returns a copy of the value. Read more

1.0.0
[src]
[]

Performs copy-assignment from source. Read more

impl<T: Debug + PrimaryData> Debug for Document<T>
[src]

[src]
[]

Formats the value using the given formatter.

impl<T: PartialEq + PrimaryData> PartialEq for Document<T>
[src]

[src]
[]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]
[]

This method tests for !=.