Skip to main content

Executor

Trait Executor 

Source
pub trait Executor: Send + Sync {
    // Required methods
    fn execute(
        &self,
        action: &Action,
        ctx: &ExecutionContext,
    ) -> Result<ActionResult, ExecutorError>;
    fn supported_kinds(&self) -> &[ActionKind];

    // Provided methods
    fn can_execute(&self, action: &Action) -> bool { ... }
    fn name(&self) -> &'static str { ... }
}
Expand description

Executor trait: Action を実行して ActionResult を返す

Required Methods§

Source

fn execute( &self, action: &Action, ctx: &ExecutionContext, ) -> Result<ActionResult, ExecutorError>

Action を実行

Source

fn supported_kinds(&self) -> &[ActionKind]

このExecutorがサポートする ActionKind の一覧

Provided Methods§

Source

fn can_execute(&self, action: &Action) -> bool

このActionを実行可能か

Source

fn name(&self) -> &'static str

名前(デバッグ用)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§