[−][src]Trait nash_protocol::protocol::NashProtocol
Trait that all Nash protocol elements implement. Enforces transformation to GraphQL as well as state changes on response processing.
Associated Types
Loading content...Required methods
#[must_use]pub fn graphql<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Convert the protocol request to GraphQL from communication with Nash server
#[must_use]pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Convert JSON response to request to the protocol's associated type
Provided methods
#[must_use]pub fn process_response<'life0, 'life1, 'async_trait>(
&'life0 self,
_response: &'life1 Self::Response,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_response: &'life1 Self::Response,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Any state changes that result from execution of the protocol request The default implementation does nothing to state
#[must_use]pub fn run_before<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn run_after<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementors
impl NashProtocol for DhFillPoolRequest[src]
type Response = DhFillPoolResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Serialize a SignStates protocol request to a GraphQL string
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Deserialize response to DhFillPool protocol response
pub fn process_response<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Update pool with response from server
impl NashProtocol for NashProtocolRequest[src]
Implement NashProtocol for the enum, threading through to the base implementation for each of the captured types. This could probably be automated wiht a macro.
type Response = NashProtocolResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn process_response<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn run_after<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for AssetNoncesRequest[src]
Implement protocol bindings for SignStatesRequest
type Response = AssetNoncesResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Serialize a SignStates protocol request to a GraphQL string
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Deserialize response to SignStates protocol request
pub fn process_response<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Asset nonces in state
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
If doing an AssetNonces request, insert a ListMarketsRequest before that to store asset list in client
impl NashProtocol for CancelAllOrders[src]
Implement protocol bindings for CancelOrder
type Response = CancelAllOrdersResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for CancelOrderRequest[src]
Implement protocol bindings for CancelOrder
type Response = CancelOrderResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for GetAccountOrderRequest[src]
Implement protocol bindings for GetAccountOrderRequest
type Response = GetAccountOrderResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for TickerRequest[src]
Implement protocol bindings for TickerRequest
type Response = TickerResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for ListAccountBalancesRequest[src]
type Response = ListAccountBalancesResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for ListAccountOrdersRequest[src]
type Response = ListAccountOrdersResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for ListAccountTradesRequest[src]
type Response = ListAccountTradesResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for ListCandlesRequest[src]
type Response = ListCandlesResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for ListMarketsRequest[src]
type Response = ListMarketsResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn process_response<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for ListTradesRequest[src]
type Response = ListTradesResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for OrderbookRequest[src]
type Response = OrderbookResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl NashProtocol for LimitOrderRequest[src]
type Response = LimitOrderResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn process_response<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: &'life1 Self::Response,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Update the number of orders remaining before state sync
pub fn run_before<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ProtocolHook>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Potentially get more r values or sign states before placing an order
impl NashProtocol for SignStatesRequest[src]
Implement protocol bindings for SignStatesRequest
type Response = SignStatesResponse
pub fn graphql<'life0, 'async_trait>(
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Serialize a SignStates protocol request to a GraphQL string
pub fn response_from_json<'life0, 'async_trait>(
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait, [src]
&'life0 self,
response: Value,
_state: Arc<Mutex<State>>
) -> Pin<Box<dyn Future<Output = Result<ResponseOrError<Self::Response>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Deserialize response to SignStates protocol request