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§
Sourcefn execute(&self, action: &AuthorizedAction) -> ActionResult
fn execute(&self, action: &AuthorizedAction) -> ActionResult
执行单个动作
Provided Methods§
Sourcefn execute_batch(&self, actions: &[AuthorizedAction]) -> Vec<ActionResult>
fn execute_batch(&self, actions: &[AuthorizedAction]) -> Vec<ActionResult>
批量执行