pub struct Next<'a> { /* private fields */ }Expand description
The continuation handed to a Middleware: it represents “the rest of the chain” — the
remaining middlewares followed by the inner transport.
Holds only borrows ('a) into the MiddlewareBackend, so advancing the chain is allocation-
free. Call Next::run to proceed; dropping a Next without calling run is how a middleware
short-circuits.
Implementations§
Source§impl<'a> Next<'a>
impl<'a> Next<'a>
Sourcepub fn run(self, request: Request) -> ExecuteFuture<'a>
pub fn run(self, request: Request) -> ExecuteFuture<'a>
Proceed to the rest of the chain: run the next middleware, or — when no middlewares remain —
execute the request on the inner transport. Returns the eventual reqwest::Response or the
super::TransportError the transport failed with.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Next<'a>
impl<'a> !UnwindSafe for Next<'a>
impl<'a> Freeze for Next<'a>
impl<'a> Send for Next<'a>
impl<'a> Sync for Next<'a>
impl<'a> Unpin for Next<'a>
impl<'a> UnsafeUnpin for Next<'a>
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