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 gf 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
Auto Trait Implementations§
impl Forget for RawResponse
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