Struct Expect
pub struct Expect { /* private fields */ }Expand description
A request containing an Expect: 100-continue header.
Implementations§
§impl Expect
impl Expect
pub fn stream(&self) -> &StreamRef
pub fn stream(&self) -> &StreamRef
Returns the request stream.
pub fn pseudo(&self) -> &PseudoHeaders
pub fn pseudo(&self) -> &PseudoHeaders
Returns the request pseudo headers.
pub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Returns mutable access to the request headers.
pub fn into_parts(self) -> (StreamRef, PseudoHeaders, HeaderMap)
pub fn into_parts(self) -> (StreamRef, PseudoHeaders, HeaderMap)
Returns the request stream, pseudo headers and headers.
pub fn ack(self) -> ControlAck
pub fn ack(self) -> ControlAck
Accepts the expectation, 100 Continue is sent and the request is processed.
pub fn fail(self, status: StatusCode, headers: HeaderMap) -> ControlAck
pub fn fail(self, status: StatusCode, headers: HeaderMap) -> ControlAck
Rejects the expectation, the response with status and headers
completes the request.
§Panics
Panics if status is informational.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Expect
impl !Send for Expect
impl !Sync for Expect
impl !UnwindSafe for Expect
impl Freeze for Expect
impl Unpin for Expect
impl UnsafeUnpin for Expect
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