pub struct Response {
pub status: String,
pub status_details: String,
pub headers: Vec<Header>,
pub body: Vec<u8>,
}Expand description
Response is the complete response received from a NWEP server.
Response is assembled from the response headers (received in on_response)
and the body chunks (accumulated in on_stream_data and delivered in on_stream_end).
Use is_ok to check whether the status indicates success.
Fields§
§status: StringNWEP status string (e.g. "ok", "not-found", "internal-error").
status_details: StringOptional human-readable status detail string.
headers: Vec<Header>Response headers.
body: Vec<u8>Response body bytes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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