Skip to main content

ActionExecutor

Trait ActionExecutor 

Source
pub trait ActionExecutor {
    // Required method
    fn execute(&self, action: &AuthorizedAction) -> ActionResult;

    // Provided method
    fn execute_batch(&self, actions: &[AuthorizedAction]) -> Vec<ActionResult> { ... }
}
Expand description

动作执行器

接收经 PolicyEngine 校验后的 AuthorizedAction, 执行真正的系统级操作 (调整 oom_score_adj, posix_fadvise 等)。

Required Methods§

Source

fn execute(&self, action: &AuthorizedAction) -> ActionResult

执行单个动作

Provided Methods§

Source

fn execute_batch(&self, actions: &[AuthorizedAction]) -> Vec<ActionResult>

批量执行

Implementors§