Struct exc_service::traits::BoxCloneExcService
source · pub struct BoxCloneExcService<R>where
R: Request,{ /* private fields */ }
Expand description
Boxed ExcService
with Clone
.
Trait Implementations§
source§impl<R> Clone for BoxCloneExcService<R>where
R: Request,
impl<R> Clone for BoxCloneExcService<R>where
R: Request,
source§impl<R> Debug for BoxCloneExcService<R>
impl<R> Debug for BoxCloneExcService<R>
source§impl<R> Service<R> for BoxCloneExcService<R>where
R: Request,
impl<R> Service<R> for BoxCloneExcService<R>where
R: Request,
§type Error = ExchangeError
type Error = ExchangeError
Errors produced by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<BoxCloneExcService<R> as Service<R>>::Response, <BoxCloneExcService<R> as Service<R>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<BoxCloneExcService<R> as Service<R>>::Response, <BoxCloneExcService<R> as Service<R>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<R> !RefUnwindSafe for BoxCloneExcService<R>
impl<R> Send for BoxCloneExcService<R>
impl<R> !Sync for BoxCloneExcService<R>
impl<R> Unpin for BoxCloneExcService<R>
impl<R> !UnwindSafe for BoxCloneExcService<R>
Blanket Implementations§
source§impl<C, Req, R> AdaptService<Req, R> for C
impl<C, Req, R> AdaptService<Req, R> for C
§type AdaptedResponse = AndThen<<C as ExcService<Req>>::Future, fn(_: <Req as Request>::Response) -> Result<<R as Request>::Response, ExchangeError>>
type AdaptedResponse = AndThen<<C as ExcService<Req>>::Future, fn(_: <Req as Request>::Response) -> Result<<R as Request>::Response, ExchangeError>>
Future returned by [
AdaptService::into_response
].source§fn adapt_from_request(&mut self, req: R) -> Result<Req, ExchangeError>
fn adapt_from_request(&mut self, req: R) -> Result<Req, ExchangeError>
Adapt the request.
source§fn adapt_into_response(
&mut self,
res: <C as ExcService<Req>>::Future
) -> <C as AdaptService<Req, R>>::AdaptedResponse
fn adapt_into_response( &mut self, res: <C as ExcService<Req>>::Future ) -> <C as AdaptService<Req, R>>::AdaptedResponse
Adapt the response future
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<S, R> ExcService<R> for S
impl<S, R> ExcService<R> for S
source§fn poll_ready(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(), ExchangeError>>
fn poll_ready( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(), ExchangeError>>
See [
Service::poll_ready
] for more details.source§fn call(&mut self, req: R) -> <S as ExcService<R>>::Future
fn call(&mut self, req: R) -> <S as ExcService<R>>::Future
See [
Service::call
] for more details.source§fn as_service(&mut self) -> AsService<'_, Self, R>where
Self: Sized,
fn as_service(&mut self) -> AsService<'_, Self, R>where
Self: Sized,
Convert to a [
Service
].source§impl<S, R> ExcServiceExt<R> for Swhere
S: ExcService<R>,
R: Request,
impl<S, R> ExcServiceExt<R> for Swhere
S: ExcService<R>,
R: Request,
source§fn into_service(self) -> IntoService<Self, R>where
Self: Sized,
fn into_service(self) -> IntoService<Self, R>where
Self: Sized,
Convert into a [
Service
].source§fn apply<L, R2>(self, layer: &L) -> L::Service
fn apply<L, R2>(self, layer: &L) -> L::Service
Apply a layer of which the result service is still a
ExcService
.source§fn boxed(self) -> BoxExcService<R>
fn boxed(self) -> BoxExcService<R>
Create a boxed
ExcService
.source§fn boxed_clone(&self) -> BoxCloneExcService<R>
fn boxed_clone(&self) -> BoxCloneExcService<R>
Create a boxed
ExcService
with Clone
.source§impl<S, R> IntoExc<R> for Swhere
S: Service<R, Response = <R as Request>::Response>,
<S as Service<R>>::Error: Into<ExchangeError>,
R: Request,
impl<S, R> IntoExc<R> for Swhere
S: Service<R, Response = <R as Request>::Response>,
<S as Service<R>>::Error: Into<ExchangeError>,
R: Request,
source§impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
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_and(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready_and(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
👎Deprecated since 0.4.6: please use the
ServiceExt::ready
method insteadYields 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 with the providing 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