pub struct MapRequest<S, F> { /* private fields */ }
Available on crate feature
util
only.Expand description
Service returned by the MapRequest
combinator.
Implementations§
Source§impl<S, F> MapRequest<S, F>
impl<S, F> MapRequest<S, F>
Sourcepub const fn new(inner: S, f: F) -> Self
pub const fn new(inner: S, f: F) -> Self
Creates a new MapRequest
service.
Sourcepub fn layer(f: F) -> MapRequestLayer<F>
pub fn layer(f: F) -> MapRequestLayer<F>
Returns a new Layer
that produces MapRequest
services.
This is a convenience function that simply calls MapRequestLayer::new
.
Trait Implementations§
Source§impl<S: Clone, F: Clone> Clone for MapRequest<S, F>
impl<S: Clone, F: Clone> Clone for MapRequest<S, F>
Source§fn clone(&self) -> MapRequest<S, F>
fn clone(&self) -> MapRequest<S, F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S, F> Debug for MapRequest<S, F>where
S: Debug,
impl<S, F> Debug for MapRequest<S, F>where
S: Debug,
Auto Trait Implementations§
impl<S, F> Freeze for MapRequest<S, F>
impl<S, F> RefUnwindSafe for MapRequest<S, F>where
S: RefUnwindSafe,
F: RefUnwindSafe,
impl<S, F> Send for MapRequest<S, F>
impl<S, F> Sync for MapRequest<S, F>
impl<S, F> Unpin for MapRequest<S, F>
impl<S, F> UnwindSafe for MapRequest<S, F>where
S: UnwindSafe,
F: UnwindSafe,
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§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,
Available on crate feature
util
only.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,
Available on crate feature
util
only.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,
Available on crate feature
util
only.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>
Available on crate feature
util
only.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>
Available on crate feature
util
only.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>
Available on crate feature
util
only.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>
Available on crate feature
util
only.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>
Available on crate feature
util
only.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>
Available on crate feature
util
only.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>
Available on crate feature
util
only.Composes a function that transforms futures produced by the service. Read more
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.