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
Collection(Vec<T>)
A collection of T
. Used for requests that target resource collections.
Member(Box<Option<T>>)
An optional T
. Used for requests that target single resources.
Trait Implementations
impl<T: Clone + PrimaryData> Clone for Data<T>
[src]
fn clone(&self) -> Data<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 Data<T>
[src]
impl<T: Eq + PrimaryData> Eq for Data<T>
[src]
impl<T: PartialEq + PrimaryData> PartialEq for Data<T>
[src]
fn eq(&self, __arg_0: &Data<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Data<T>) -> bool
[src]
This method tests for !=
.
impl<T: PrimaryData> From<Option<T>> for Data<T>
[src]
impl<T: PrimaryData> From<Vec<T>> for Data<T>
[src]
impl<T: PrimaryData> From<T> for Data<T>
[src]
impl<T: PrimaryData> FromIterator<T> for Data<T>
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
Creates a value from an iterator. Read more