[][src]Struct japi::Document

pub struct Document {
    pub data: OptionalVec<GenericObject>,
    pub errors: Option<Vec<Error>>,
    pub meta: Option<Meta>,
    pub jsonapi: Option<JsonApi>,
    pub links: Option<Links>,
    pub included: Option<Vec<GenericObject>>,
}

The object at the root of every JSON:API message

For validitity it must contain at least one of data, errors, or meta

See the JSON:API docs for more information

Fields

data: OptionalVec<GenericObject>

The document's primary data

errors: Option<Vec<Error>>

Any errors that were encountered

meta: Option<Meta>

Non-standard meta information

jsonapi: Option<JsonApi>

Information about the version of JSON:API being used

links: Option<Links>

Links related to the primary data

included: Option<Vec<GenericObject>>

Included resources related to the primary data or each other

Trait Implementations

impl Clone for Document[src]

impl Debug for Document[src]

impl Default for Document[src]

impl<'de> Deserialize<'de> for Document[src]

impl PartialEq<Document> for Document[src]

impl Serialize for Document[src]

impl StructuralPartialEq for Document[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.