async fn execute_protocol_http<T: NashProtocol + Sync>(
        &self,
        request: T,
    ) -> Result<ResponseOrError<T::Response>> {
        let query = request.graphql(self.state.clone()).await?;
        let json_payload = self.request_http(query).await?;
        let protocol_response = request
            .response_from_json(json_payload, self.state.clone())
            .await?;
        match protocol_response{
            ResponseOrError::Response(ref response) => {
                request
                    .process_response(&response.data, self.state.clone())
                    .await?;
            }
            ResponseOrError::Error(ref error_response) => {
                request
                    .process_error(error_response, self.state.clone())
                    .await?;
            }
        }
        Ok(protocol_response)
    }
/// Execute a NashProtocol request. Query will be created, executed over network, response will
/// be passed to the protocol's state update hook, and response will be returned. Used by the even
/// more generic `run_http(..)`.
Execute a NashProtocol request. Query will be created, executed over network, response will
be passed to the protocol's state update hook, and response will be returned. Used by the even
more generic `run_http(..)`.
Execute a NashProtocol request . Query will be created executed over network response will be passed to the protocol ' s state update hook and response will be returned . Used by the even more generic ` run_http ( .. ) ` .
async fn execute_protocol_http<T: NashProtocol + Sync>(
        &self,
        request: T,
    ) -> Result<ResponseOrError<T::Response>> {
        let query = request.graphql(self.state.clone()).await?;
        let json_payload = self.request_http(query).await?;
        let protocol_response = request
            .response_from_json(json_payload, self.state.clone())
            .await?;
        match protocol_response{
            ResponseOrError::Response(ref response) => {
                request
                    .process_response(&response.data, self.state.clone())
                    .await?;
            }
            ResponseOrError::Error(ref error_response) => {
                request
                    .process_error(error_response, self.state.clone())
                    .await?;
            }
        }
        Ok(protocol_response)
    }
async fn execute_protocol_http < T : NashProtocol + Sync > ( & self , request : T , ) -> Result < ResponseOrError < T :: Response > > { let query = request . graphql ( self . state . clone ( ) ) . await ? ; let json_payload = self . request_http ( query ) . await ? ; let protocol_response = request . response_from_json ( json_payload , self . state . clone ( ) ) . await ? ; match protocol_response { ResponseOrError :: Response ( ref response ) => { request . process_response ( & response . data , self . state . clone ( ) ) . await ? ; } ResponseOrError :: Error ( ref error_response ) => { request . process_error ( error_response , self . state . clone ( ) ) . await ? ; } } Ok ( protocol_response ) }
Execute a NashProtocol request.
Execute a NashProtocol request .
&self
request
T