pub struct RawResponse {
pub status: u16,
pub headers: HeaderMap,
pub json: Option<Value>,
pub text: String,
}Expand description
A response that succeeded at the HTTP level, kept in both raw and parsed form
so fx api can pass anything through untouched.
Fields§
§status: u16§headers: HeaderMap§json: Option<Value>§text: StringImplementations§
Source§impl RawResponse
impl RawResponse
pub fn json_or_null(&self) -> Value
pub fn deserialize<T: DeserializeOwned>(&self) -> Result<T>
Trait Implementations§
Source§impl Clone for RawResponse
impl Clone for RawResponse
Source§fn clone(&self) -> RawResponse
fn clone(&self) -> RawResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RawResponse
impl RefUnwindSafe for RawResponse
impl Send for RawResponse
impl Sync for RawResponse
impl Unpin for RawResponse
impl UnsafeUnpin for RawResponse
impl UnwindSafe for RawResponse
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