pub struct CFetchResponse { /* private fields */ }Expand description
The response of the network_fetch call holding the result and associated data of the request.
Implementations§
Source§impl CFetchResponse
impl CFetchResponse
Sourcepub fn status(&self) -> u16
pub fn status(&self) -> u16
The final HTTP Status Code associated with the request. 2XX good, 4XX - 5XX bad.
Sourcepub fn status_text(&self) -> String
pub fn status_text(&self) -> String
Any associated text with the status code if it was provided.
Sourcepub fn data_as_bytes(&self) -> Option<Vec<u8>>
pub fn data_as_bytes(&self) -> Option<Vec<u8>>
The data as bytes if the request results in a blob / byte array data. None returned if not.
Sourcepub fn data_as_json(&self) -> Option<CObject>
pub fn data_as_json(&self) -> Option<CObject>
The data as JSON if the request results in a JSON return type data. None returned if not.
Sourcepub fn data_as_string(&self) -> Option<String>
pub fn data_as_string(&self) -> Option<String>
The data as string if the request results in a string return type data. None returned if not.
Auto Trait Implementations§
impl Freeze for CFetchResponse
impl RefUnwindSafe for CFetchResponse
impl Send for CFetchResponse
impl Sync for CFetchResponse
impl Unpin for CFetchResponse
impl UnsafeUnpin for CFetchResponse
impl UnwindSafe for CFetchResponse
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