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>>,
}Expand description
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§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more