pub struct RouterIntoService<B, S = ()> { /* private fields */ }
Expand description
A Router
converted into an owned Service
with a fixed body type.
See Router::into_service
for more details.
Trait Implementations§
Source§impl<B, S> Clone for RouterIntoService<B, S>
impl<B, S> Clone for RouterIntoService<B, S>
Source§impl<B, S> Debug for RouterIntoService<B, S>where
S: Debug,
impl<B, S> Debug for RouterIntoService<B, S>where
S: Debug,
Source§impl<B> Service<Request<B>> for RouterIntoService<B, ()>
impl<B> Service<Request<B>> for RouterIntoService<B, ()>
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = RouteFuture<Infallible>
type Future = RouteFuture<Infallible>
The future response value.
Auto Trait Implementations§
impl<B, S> Freeze for RouterIntoService<B, S>
impl<B, S = ()> !RefUnwindSafe for RouterIntoService<B, S>
impl<B, S> Send for RouterIntoService<B, S>where
B: Send,
impl<B, S> Sync for RouterIntoService<B, S>where
B: Sync,
impl<B, S> Unpin for RouterIntoService<B, S>where
B: Unpin,
impl<B, S = ()> !UnwindSafe for RouterIntoService<B, S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<S, R> ServiceExt<R> for Swhere
S: Service<R>,
impl<S, R> ServiceExt<R> for Swhere
S: Service<R>,
Source§fn into_make_service(self) -> IntoMakeService<S>
fn into_make_service(self) -> IntoMakeService<S>
Convert this service into a
MakeService
, that is a Service
whose
response is another service. Read moreSource§fn handle_error<F, T>(self, f: F) -> HandleError<Self, F, T>
fn handle_error<F, T>(self, f: F) -> HandleError<Self, F, T>
Convert this service into a
HandleError
, that will handle errors
by converting them into responses. Read moreSource§impl<T, Request> ServiceExt<Request> for T
impl<T, Request> ServiceExt<Request> for T
Source§fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
Yields a mutable reference to the service when it is ready to accept a request.
Source§fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
Yields the service when it is ready to accept a request.
Source§fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
Consume this
Service
, calling it with the provided request once it is ready.Source§fn and_then<F>(self, f: F) -> AndThen<Self, F>
fn and_then<F>(self, f: F) -> AndThen<Self, F>
Executes a new future after this service’s future resolves. This does
not alter the behaviour of the
poll_ready
method. Read moreSource§fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
Maps this service’s response value to a different value. This does not
alter the behaviour of the
poll_ready
method. Read moreSource§fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
Maps this service’s error value to a different value. This does not
alter the behaviour of the
poll_ready
method. Read moreSource§fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
Maps this service’s result type (
Result<Self::Response, Self::Error>
)
to a different value, regardless of whether the future succeeds or
fails. Read moreSource§fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
Composes a function in front of the service. Read more
Source§fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
Composes an asynchronous function after this service. Read more
Source§fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
Composes a function that transforms futures produced by the service. Read more
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes