Skip to main content

ActionAdapter

Trait ActionAdapter 

Source
pub trait ActionAdapter {
    // Required methods
    fn name(&self) -> &'static str;
    fn execute(
        &self,
        authorized: &AuthorizedAction,
    ) -> Result<ActionOutcome, AdapterError>;
}
Expand description

动作 dispatch 抽象。

DefaultActionExecutor(Android bridge 转发 + 本地 stub)与 OfflineAdapter(纯离线确定性模拟)都实现此 trait,由 ActionLifecycle 在运行时二选一注入。

Required Methods§

Source

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

Source

fn execute( &self, authorized: &AuthorizedAction, ) -> Result<ActionOutcome, AdapterError>

Implementors§