MakeInstruments

Trait MakeInstruments 

Source
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§