pub struct Expect(/* private fields */);Expand description
A request containing an Expect: 100-continue header.
Implementations§
Source§impl Expect
impl Expect
Sourcepub fn ack<F>(self) -> ControlAck<F>
pub fn ack<F>(self) -> ControlAck<F>
Sends 100 Continue and passes the request to the application service.
Sourcepub fn fail<E: ResponseError, F>(self, err: E) -> ControlAck<F>
pub fn fail<E: ResponseError, F>(self, err: E) -> ControlAck<F>
Rejects the expectation with the response generated from err.
Sourcepub fn fail_with<F>(self, res: Response) -> ControlAck<F>
pub fn fail_with<F>(self, res: Response) -> ControlAck<F>
Rejects the expectation with a custom response.
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