Skip to main content

BacktestClient

Trait BacktestClient 

Source
pub trait BacktestClient: Send + Sync {
    // Required methods
    fn ping<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<PingResponse, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn submit<'life0, 'async_trait>(
        &'life0 self,
        request: SubmitBacktestRequest,
    ) -> Pin<Box<dyn Future<Output = Result<SubmitBacktestResponse, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        job_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<BacktestStatusResponse, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn watch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        job_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<BacktestEvent, BacktestClientError>> + Send>>, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn result<'life0, 'life1, 'async_trait>(
        &'life0 self,
        job_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<GetBacktestResultResponse, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_result_artifact_chunk<'life0, 'async_trait>(
        &'life0 self,
        request: GetResultArtifactChunkRequest,
    ) -> Pin<Box<dyn Future<Output = Result<GetResultArtifactChunkResponse, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn delete_result_artifact<'life0, 'async_trait>(
        &'life0 self,
        request: DeleteResultArtifactRequest,
    ) -> Pin<Box<dyn Future<Output = Result<DeleteResultArtifactResponse, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn cancel<'life0, 'life1, 'async_trait>(
        &'life0 self,
        job_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<CancelBacktestResponse, BacktestClientError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Provider-neutral client port for the retained backtest-job workflow.

Required Methods§

Source

fn ping<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<PingResponse, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn submit<'life0, 'async_trait>( &'life0 self, request: SubmitBacktestRequest, ) -> Pin<Box<dyn Future<Output = Result<SubmitBacktestResponse, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 self, job_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<BacktestStatusResponse, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn watch<'life0, 'life1, 'async_trait>( &'life0 self, job_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<BacktestEvent, BacktestClientError>> + Send>>, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn result<'life0, 'life1, 'async_trait>( &'life0 self, job_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<GetBacktestResultResponse, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_result_artifact_chunk<'life0, 'async_trait>( &'life0 self, request: GetResultArtifactChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<GetResultArtifactChunkResponse, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn delete_result_artifact<'life0, 'async_trait>( &'life0 self, request: DeleteResultArtifactRequest, ) -> Pin<Box<dyn Future<Output = Result<DeleteResultArtifactResponse, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn cancel<'life0, 'life1, 'async_trait>( &'life0 self, job_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<CancelBacktestResponse, BacktestClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§