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
Ok
Does not contain errors.
Err
Contains 1 or more error(s).
Methods
impl<T: PrimaryData> Document<T>
[src]
fn is_ok(&self) -> bool
[src][−]
Returns true
if the document does not contain any errors.
fn is_err(&self) -> bool
[src][−]
Returns true
if the document contains 1 or more error(s).
Trait Implementations
impl<T: Clone + PrimaryData> Clone for Document<T>
[src]
fn clone(&self) -> Document<T>
[src][−]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src][−]
Performs copy-assignment from source
. Read more
impl<T: Debug + PrimaryData> Debug for Document<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src][−]
Formats the value using the given formatter.