pub struct Resource<A> {
pub id: Option<String>,
pub kind: Option<String>,
pub attributes: A,
pub relationships: Value,
}Expand description
A single JSON:API resource: id + type + attributes.
Fields§
§id: Option<String>Resource id (string or number on the wire — see [de_id]).
kind: Option<String>Resource type ("report", "program", …).
attributes: AThe resource’s attributes.
relationships: ValueRelationships, kept as raw JSON.
Trait Implementations§
Source§impl<'de, A> Deserialize<'de> for Resource<A>where
A: Deserialize<'de> + Default,
impl<'de, A> Deserialize<'de> for Resource<A>where
A: Deserialize<'de> + Default,
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
Auto Trait Implementations§
impl<A> Freeze for Resource<A>where
A: Freeze,
impl<A> RefUnwindSafe for Resource<A>where
A: RefUnwindSafe,
impl<A> Send for Resource<A>where
A: Send,
impl<A> Sync for Resource<A>where
A: Sync,
impl<A> Unpin for Resource<A>where
A: Unpin,
impl<A> UnsafeUnpin for Resource<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for Resource<A>where
A: UnwindSafe,
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