pub struct ResourceObject {
pub kind: String,
pub id: Option<String>,
pub attributes: BTreeMap<String, Value>,
pub relationships: BTreeMap<String, Relationship>,
pub meta: Option<BTreeMap<String, Value>>,
pub links: Option<Links>,
}Expand description
A JSON:API resource object.
Fields§
§kind: StringThe resource type — ResourceSchema::name.
id: Option<String>Absent on a client-generated create, present everywhere else.
attributes: BTreeMap<String, Value>A redacted or unrequested attribute is absent, never null.
relationships: BTreeMap<String, Relationship>§meta: Option<BTreeMap<String, Value>>Aggregates land here — ResourceSchema::aggregates.
links: Option<Links>Implementations§
Trait Implementations§
Source§impl Clone for ResourceObject
impl Clone for ResourceObject
Source§impl Debug for ResourceObject
impl Debug for ResourceObject
Source§impl<'de> Deserialize<'de> for ResourceObject
impl<'de> Deserialize<'de> for ResourceObject
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
Source§impl PartialEq for ResourceObject
impl PartialEq for ResourceObject
Source§impl Serialize for ResourceObject
impl Serialize for ResourceObject
impl StructuralPartialEq for ResourceObject
Auto Trait Implementations§
impl Freeze for ResourceObject
impl RefUnwindSafe for ResourceObject
impl Send for ResourceObject
impl Sync for ResourceObject
impl Unpin for ResourceObject
impl UnsafeUnpin for ResourceObject
impl UnwindSafe for ResourceObject
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