pub async fn run<T: NashProtocolPipeline + Clone + Sync>(
        &self,
        request: T,
    ) -> Result<ResponseOrError<<T::ActionType as NashProtocol>::Response>> {
        // First run any dependencies of the request/pipeline
        let before_actions = request.run_before(self.state.clone()).await?;

        if let Some(actions) = before_actions {
            for action in actions {
                self.run_helper(action).await?;
            }
        }

        // Now run the pipeline
        // FIXME: get rid of the move here
        let out = self.run_helper(request.clone()).await;

        // Get things to run after the request/pipeline
        let after_actions = request.run_after(self.state.clone()).await?;

        // Now run anything specified for after the pipeline
        if let Some(actions) = after_actions {
            for action in actions {
                self.run_helper(action).await?;
            }
        }

        out
    }
/// Main entry point to execute Nash API requests. Capable of running anything that implements `NashProtocolPipeline`.
/// All `NashProtocol` requests automatically do. Other more complex mutli-stage interactions like `SignAllStates`
/// implement the trait manually. This will optionally run before and after hooks if those are defined for the pipeline
/// or request (e.g., get asset nonces if they don't exist)
Main entry point to execute Nash API requests. Capable of running anything that implements `NashProtocolPipeline`.
All `NashProtocol` requests automatically do. Other more complex mutli-stage interactions like `SignAllStates`
implement the trait manually. This will optionally run before and after hooks if those are defined for the pipeline
or request
Main entry point to execute Nash API requests . Capable of running anything that implements ` NashProtocolPipeline ` . All ` NashProtocol ` requests automatically do . Other more complex mutli - stage interactions like ` SignAllStates ` implement the trait manually . This will optionally run before and after hooks if those are defined for the pipeline or request
pub async fn run<T: NashProtocolPipeline + Clone + Sync>(
        &self,
        request: T,
    ) -> Result<ResponseOrError<<T::ActionType as NashProtocol>::Response>> {
        // First run any dependencies of the request/pipeline
        let before_actions = request.run_before(self.state.clone()).await?;
        if let Some(actions) = before_actions {
            for action in actions {
                self.run_helper(action).await?;
            }
        }
        // Now run the pipeline
        // FIXME: get rid of the move here
        let out = self.run_helper(request.clone()).await;
        // Get things to run after the request/pipeline
        let after_actions = request.run_after(self.state.clone()).await?;
        // Now run anything specified for after the pipeline
        if let Some(actions) = after_actions {
            for action in actions {
                self.run_helper(action).await?;
            }
        }
        out
    }
pub async fn run < T : NashProtocolPipeline + Clone + Sync > ( & self , request : T , ) -> Result < ResponseOrError < < T :: ActionType as NashProtocol > :: Response > > { // First run any dependencies of the request/pipeline let before_actions = request . run_before ( self . state . clone ( ) ) . await ? ; if let Some ( actions ) = before_actions { for action in actions { self . run_helper ( action ) . await ? ; } } // Now run the pipeline // FIXME: get rid of the move here let out = self . run_helper ( request . clone ( ) ) . await ; // Get things to run after the request/pipeline let after_actions = request . run_after ( self . state . clone ( ) ) . await ? ; // Now run anything specified for after the pipeline if let Some ( actions ) = after_actions { for action in actions { self . run_helper ( action ) . await ? ; } } out }
Main entry point to execute Nash API requests.
Main entry point to execute Nash API requests .
&self
request
T
&self
request
T