Enum nash_protocol::protocol::subscriptions::SubscriptionRequest [−][src]
pub enum SubscriptionRequest {
Trades(SubscribeTrades),
Ticker(SubscribeTicker),
Orderbook(SubscribeOrderbook),
AccountTrades(SubscribeAccountTrades),
AccountOrders(SubscribeAccountOrders),
AccountBalances(SubscribeAccountBalances),
}Expand description
Wrapper for all subscription request types supported on Nash. Required only for current version of openlimits subscription logic
Variants
Trades(SubscribeTrades)Tuple Fields of Trades
Ticker(SubscribeTicker)Tuple Fields of Ticker
Orderbook(SubscribeOrderbook)Tuple Fields of Orderbook
AccountTrades(SubscribeAccountTrades)Tuple Fields of AccountTrades
AccountOrders(SubscribeAccountOrders)Tuple Fields of AccountOrders
AccountBalances(SubscribeAccountBalances)Tuple Fields of AccountBalances
Trait Implementations
Performs the conversion.
Convert the protocol request to GraphQL from communication with Nash server
fn subscription_response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<RwLock<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::SubscriptionResponse>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn subscription_response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<RwLock<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::SubscriptionResponse>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Convert JSON response from incoming subscription data into protocol’s associated type
fn wrap_response_as_any_subscription<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<RwLock<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<SubscriptionResponse>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Update state based on data from incoming subscription response
Auto Trait Implementations
impl RefUnwindSafe for SubscriptionRequest
impl Send for SubscriptionRequest
impl Sync for SubscriptionRequest
impl Unpin for SubscriptionRequest
impl UnwindSafe for SubscriptionRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more