pub trait MakeInstruments {
    type Service: SendExcService<SubscribeInstruments>;
    type Future: Future<Output = Result<Self::Service, ExchangeError>>;

    // Required methods
    fn poll_ready(
        &mut self,
        cx: &mut Context<'_>
    ) -> Poll<Result<(), ExchangeError>>;
    fn make_instruments(
        &mut self,
        options: MakeInstrumentsOptions
    ) -> Self::Future;

    // Provided method
    fn as_make_instruments_service(&mut self) -> AsService<'_, Self>
       where Self: Sized { ... }
}
Expand description

Make a service to subscribe instruments.

Required Associated Types§

source

type Service: SendExcService<SubscribeInstruments>

Service to subscribe instruments.

source

type Future: Future<Output = Result<Self::Service, ExchangeError>>

The future of the service.

Required Methods§

source

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) -> Self::Future

Create a new service to subscribe instruments.

Provided Methods§

source

fn as_make_instruments_service(&mut self) -> AsService<'_, Self>
where Self: Sized,

Convert to a Service.

Implementors§