pub struct ExecPolicyManager { /* private fields */ }Expand description
Manages execution policies and authorization decisions.
Implementations§
Source§impl ExecPolicyManager
impl ExecPolicyManager
Sourcepub async fn load_policy(&self, path: &Path) -> Result<()>
pub async fn load_policy(&self, path: &Path) -> Result<()>
Load policy from a file.
Sourcepub async fn set_sandbox_policy(&self, policy: SandboxPolicy)
pub async fn set_sandbox_policy(&self, policy: SandboxPolicy)
Set the sandbox policy.
Sourcepub async fn sandbox_policy(&self) -> SandboxPolicy
pub async fn sandbox_policy(&self) -> SandboxPolicy
Get the current sandbox policy.
Sourcepub async fn check_approval_batch(
&self,
commands: &[Vec<String>],
) -> ExecApprovalRequirement
pub async fn check_approval_batch( &self, commands: &[Vec<String>], ) -> ExecApprovalRequirement
Check multiple commands and return combined approval requirement.
Sourcepub async fn evaluate(&self, command: &[String]) -> PolicyEvaluation
pub async fn evaluate(&self, command: &[String]) -> PolicyEvaluation
Evaluate a command against the full policy stack.
Auto Trait Implementations§
impl !Freeze for ExecPolicyManager
impl !RefUnwindSafe for ExecPolicyManager
impl !UnwindSafe for ExecPolicyManager
impl Send for ExecPolicyManager
impl Sync for ExecPolicyManager
impl Unpin for ExecPolicyManager
impl UnsafeUnpin for ExecPolicyManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more