Enum json_api::doc::Data [] [src]

pub enum Data<T: PrimaryData> {
    Collection(Vec<T>),
    Member(Box<Option<T>>),
}

Describes the data of a document or resource linkage.

For more information, check out the top level section of the JSON API specification.

Variants

A collection of T. Used for requests that target resource collections.

An optional T. Used for requests that target single resources.

Trait Implementations

impl<T: Clone + PrimaryData> Clone for Data<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 Data<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: Eq + PrimaryData> Eq for Data<T>
[src]

impl<T: PartialEq + PrimaryData> PartialEq for Data<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 !=.

impl<T: PrimaryData> From<Option<T>> for Data<T>
[src]

[src]

Performs the conversion.

impl<T: PrimaryData> From<Vec<T>> for Data<T>
[src]

[src]

Performs the conversion.

impl<T: PrimaryData> From<T> for Data<T>
[src]

[src]

Performs the conversion.

impl<T: PrimaryData> FromIterator<T> for Data<T>
[src]

[src]

Creates a value from an iterator. Read more