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§
Sourcefn execute(
&self,
action: &Action,
ctx: &ExecutionContext,
) -> Result<ActionResult, ExecutorError>
fn execute( &self, action: &Action, ctx: &ExecutionContext, ) -> Result<ActionResult, ExecutorError>
Action を実行
Sourcefn supported_kinds(&self) -> &[ActionKind]
fn supported_kinds(&self) -> &[ActionKind]
このExecutorがサポートする ActionKind の一覧
Provided Methods§
Sourcefn can_execute(&self, action: &Action) -> bool
fn can_execute(&self, action: &Action) -> bool
このActionを実行可能か
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".