pub struct DataDoc<A> {
pub data: A,
}Expand description
A bare { "data": … } envelope whose data is not a JSON:API resource.
A few endpoints return a plain object under data instead of the usual
id/type/attributes resource — notably
GET /v1/hackers/payments/balance ({"data":{"balance":105}}).
Fields§
§data: AThe unwrapped object.
Trait Implementations§
Source§impl<'de, A> Deserialize<'de> for DataDoc<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for DataDoc<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 DataDoc<A>where
A: Freeze,
impl<A> RefUnwindSafe for DataDoc<A>where
A: RefUnwindSafe,
impl<A> Send for DataDoc<A>where
A: Send,
impl<A> Sync for DataDoc<A>where
A: Sync,
impl<A> Unpin for DataDoc<A>where
A: Unpin,
impl<A> UnsafeUnpin for DataDoc<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for DataDoc<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