pub struct JsonFormat;Expand description
A Format that deserializes response bodies using JSON.
This is the default format used for deserialization.
This format supports deserializing response bodies to:
ResponseBody- The raw response body, without any deserialization.- Any value implementing
serde::de::DeserializeOwned- Deserializes the response body to the specified type using JSON deserialization.
Trait Implementations§
Source§impl Clone for JsonFormat
impl Clone for JsonFormat
Source§fn clone(&self) -> JsonFormat
fn clone(&self) -> JsonFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonFormat
impl Debug for JsonFormat
impl Format for JsonFormat
Auto Trait Implementations§
impl Freeze for JsonFormat
impl RefUnwindSafe for JsonFormat
impl Send for JsonFormat
impl Sync for JsonFormat
impl Unpin for JsonFormat
impl UnwindSafe for JsonFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
impl<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
Source§fn deserialize_with(body: ResponseBody) -> Result<D, Error>
fn deserialize_with(body: ResponseBody) -> Result<D, Error>
Deserialize the response body using the specified format. Read more