pub struct NewRequest(/* private fields */);Expand description
Notification that a complete request head has been received.
Implementations§
Source§impl NewRequest
impl NewRequest
Sourcepub fn ack<F>(self) -> ControlAck<F>
pub fn ack<F>(self) -> ControlAck<F>
Accepts the request and continues with expectation handling, upgrade handling, or the application service as appropriate.
Sourcepub fn fail<E: ResponseError, F>(self, err: E) -> ControlAck<F>
pub fn fail<E: ResponseError, F>(self, err: E) -> ControlAck<F>
Rejects the request 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 request with a custom response.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NewRequest
impl !Send for NewRequest
impl !Sync for NewRequest
impl !UnwindSafe for NewRequest
impl Freeze for NewRequest
impl Unpin for NewRequest
impl UnsafeUnpin for NewRequest
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