pub struct WireResponse {
pub status: u16,
pub endpoint: String,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
}Expand description
What a transport hands back: what the server said, and the bytes it said it with.
Deliberately not a decoded document. Status and headers are load-bearing above this layer — a 304 is the whole point of a conditional spec fetch, and an error body is what names the offending parameter — and a transport that decoded eagerly would have to throw one of them away.
Fields§
§status: u16The HTTP status, or the transport’s equivalent.
endpoint: StringWhat actually answered, for diagnostics.
The transport resolves the base, so it is the only layer that knows the
full address a contract-relative path became — and an error message
naming /v1/sessions when three deployments were in play is the message
that costs an afternoon.
headers: Vec<(String, String)>Response headers, in the order received.
body: Vec<u8>The response body, verbatim.
Implementations§
Source§impl WireResponse
impl WireResponse
Trait Implementations§
Source§impl Clone for WireResponse
impl Clone for WireResponse
Source§fn clone(&self) -> WireResponse
fn clone(&self) -> WireResponse
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 WireResponse
impl RefUnwindSafe for WireResponse
impl Send for WireResponse
impl Sync for WireResponse
impl Unpin for WireResponse
impl UnsafeUnpin for WireResponse
impl UnwindSafe for WireResponse
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