pub trait SubscriptionValidator {
type Parser: StreamParser;
// Required method
fn validate<'life0, 'async_trait, Exchange, InstrumentKey, Kind>(
instrument_map: Map<InstrumentKey>,
websocket: &'life0 mut WebSocket,
) -> Pin<Box<dyn Future<Output = Result<(Map<InstrumentKey>, Vec<WsMessage>), SocketError>> + Send + 'async_trait>>
where Exchange: Connector + Send + 'async_trait,
InstrumentKey: Send + 'async_trait,
Kind: SubscriptionKind + Send + 'async_trait,
'life0: 'async_trait;
}Expand description
Defines how to validate that actioned market data
Subscriptions were accepted by the exchange.
Required Associated Types§
type Parser: StreamParser
Required Methods§
fn validate<'life0, 'async_trait, Exchange, InstrumentKey, Kind>(
instrument_map: Map<InstrumentKey>,
websocket: &'life0 mut WebSocket,
) -> Pin<Box<dyn Future<Output = Result<(Map<InstrumentKey>, Vec<WsMessage>), SocketError>> + Send + 'async_trait>>where
Exchange: Connector + Send + 'async_trait,
InstrumentKey: Send + 'async_trait,
Kind: SubscriptionKind + Send + 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.