Trait Worker

Source
pub trait Worker {
    // Required methods
    fn upload_scenario(
        &self,
        client: WorkerToCoordinatorClient,
        name: String,
        content: Vec<u8>,
    ) -> impl Future<Output = ()> + Send;
    fn ping(
        &self,
        client: WorkerToCoordinatorClient,
    ) -> impl Future<Output = String> + Send;
    fn start(
        &self,
        client: WorkerToCoordinatorClient,
        name: String,
        config: Config,
        run_id: RunId,
    ) -> impl Future<Output = Result<(), WorkerError>> + Send;
    fn get_data(
        &self,
        client: WorkerToCoordinatorClient,
    ) -> impl Future<Output = WorkerData> + Send;
    fn get_run_status(
        &self,
        client: WorkerToCoordinatorClient,
        id: RunId,
    ) -> impl Future<Output = RunInfo> + Send;
}

Required Methods§

Source

fn upload_scenario( &self, client: WorkerToCoordinatorClient, name: String, content: Vec<u8>, ) -> impl Future<Output = ()> + Send

Source

fn ping( &self, client: WorkerToCoordinatorClient, ) -> impl Future<Output = String> + Send

Source

fn start( &self, client: WorkerToCoordinatorClient, name: String, config: Config, run_id: RunId, ) -> impl Future<Output = Result<(), WorkerError>> + Send

Source

fn get_data( &self, client: WorkerToCoordinatorClient, ) -> impl Future<Output = WorkerData> + Send

Source

fn get_run_status( &self, client: WorkerToCoordinatorClient, id: RunId, ) -> impl Future<Output = RunInfo> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§