Struct exc_core::exchange::instruments::AsService
source · pub struct AsService<'a, M>where
M: MakeInstruments,{ /* private fields */ }Expand description
Service returns by MakeInstruments::as_make_instruments_service.
Trait Implementations§
source§impl<M> Service<MakeInstrumentsOptions> for AsService<'_, M>where
M: MakeInstruments,
impl<M> Service<MakeInstrumentsOptions> for AsService<'_, M>where
M: MakeInstruments,
§type Response = <M as MakeInstruments>::Service
type Response = <M as MakeInstruments>::Service
Responses given by the service.
§type Error = ExchangeError
type Error = ExchangeError
Errors produced by the service.
§type Future = <M as MakeInstruments>::Future
type Future = <M as MakeInstruments>::Future
The future response value.
source§fn poll_ready(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(), <AsService<'_, M> as Service<MakeInstrumentsOptions>>::Error>>
fn poll_ready( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(), <AsService<'_, M> as Service<MakeInstrumentsOptions>>::Error>>
Returns
Poll::Ready(Ok(())) when the service is able to process requests. Read moresource§fn call(
&mut self,
options: MakeInstrumentsOptions
) -> <AsService<'_, M> as Service<MakeInstrumentsOptions>>::Future
fn call( &mut self, options: MakeInstrumentsOptions ) -> <AsService<'_, M> as Service<MakeInstrumentsOptions>>::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<'a, M> RefUnwindSafe for AsService<'a, M>where
M: RefUnwindSafe,
impl<'a, M> Send for AsService<'a, M>where
M: Send,
impl<'a, M> Sync for AsService<'a, M>where
M: Sync,
impl<'a, M> Unpin for AsService<'a, M>
impl<'a, M> !UnwindSafe for AsService<'a, M>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<M> MakeInstruments for Mwhere
M: MakeService<MakeInstrumentsOptions, SubscribeInstruments, Response = <SubscribeInstruments as Request>::Response, Error = ExchangeError>,
<M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::Service: SendExcService<SubscribeInstruments>,
<M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::MakeError: Into<ExchangeError>,
impl<M> MakeInstruments for Mwhere
M: MakeService<MakeInstrumentsOptions, SubscribeInstruments, Response = <SubscribeInstruments as Request>::Response, Error = ExchangeError>,
<M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::Service: SendExcService<SubscribeInstruments>,
<M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::MakeError: Into<ExchangeError>,
§type Service = <M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::Service
type Service = <M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::Service
Service to subscribe instruments.
§type Future = MapErr<<M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::Future, fn(_: <M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::MakeError) -> ExchangeError>
type Future = MapErr<<M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::Future, fn(_: <M as MakeService<MakeInstrumentsOptions, SubscribeInstruments>>::MakeError) -> ExchangeError>
The future of the service.
source§fn poll_ready(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(), ExchangeError>>
fn poll_ready( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(), ExchangeError>>
Returns
Ready when the factory is able to create more service.source§fn make_instruments(
&mut self,
options: MakeInstrumentsOptions
) -> <M as MakeInstruments>::Future
fn make_instruments( &mut self, options: MakeInstrumentsOptions ) -> <M as MakeInstruments>::Future
Create a new service to subscribe instruments.
source§impl<M, S, Target, Request> MakeService<Target, Request> for Mwhere
M: Service<Target, Response = S>,
S: Service<Request>,
impl<M, S, Target, Request> MakeService<Target, Request> for Mwhere
M: Service<Target, Response = S>,
S: Service<Request>,
source§fn poll_ready(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
fn poll_ready( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
Returns
Ready when the factory is able to create more services. Read moresource§fn make_service(
&mut self,
target: Target
) -> <M as MakeService<Target, Request>>::Future
fn make_service( &mut self, target: Target ) -> <M as MakeService<Target, Request>>::Future
Create and return a new service value asynchronously.
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