pub struct Resource<A> {
pub id: String,
pub resource_type: String,
pub attributes: A,
pub relationships: Option<Value>,
}Expand description
A single JSON:API resource object: its id, type, and typed attributes.
Relationships are intentionally left untyped (serde_json::Value) —
this crate builds relationship payloads explicitly on requests rather
than typing every relationship shape App Store Connect can return.
Fields§
§id: String§resource_type: String§attributes: A§relationships: Option<Value>Trait Implementations§
Source§impl<'de, A> Deserialize<'de> for Resource<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for Resource<A>where
A: Deserialize<'de>,
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