pub struct IncomingResponse { /* private fields */ }
Expand description
Represents an incoming HTTP Response.
Implementations§
Source§impl IncomingResponse
impl IncomingResponse
Sourcepub fn headers(&self) -> Fields
pub fn headers(&self) -> Fields
Returns the headers from the incoming response.
The returned headers
resource is immutable: set
, append
, and
delete
operations will fail with header-error.immutable
.
This headers resource is a child: it must be dropped before the parent
incoming-response
is dropped.
Source§impl IncomingResponse
impl IncomingResponse
Sourcepub fn consume(&self) -> Result<IncomingBody, ()>
pub fn consume(&self) -> Result<IncomingBody, ()>
Returns the incoming body. May be called at most once. Returns error if called additional times.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for IncomingResponse
impl RefUnwindSafe for IncomingResponse
impl Send for IncomingResponse
impl Sync for IncomingResponse
impl Unpin for IncomingResponse
impl UnwindSafe for IncomingResponse
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