Struct nash_protocol::protocol::subscriptions::trades::SubscribeTrades [−][src]
pub struct SubscribeTrades {
pub market: String,
}Expand description
Initiate subscription to get new trades
Fields
market: StringImplementations
pub async fn response_from_graphql(
&self,
response: ResponseOrError<ResponseData>,
state: Arc<RwLock<State>>
) -> Result<ResponseOrError<TradesResponse>>
Trait Implementations
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 SubscribeTrades
impl Send for SubscribeTrades
impl Sync for SubscribeTrades
impl Unpin for SubscribeTrades
impl UnwindSafe for SubscribeTrades
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