pub struct ExecPolicyEngine { /* private fields */ }Implementations§
Source§impl ExecPolicyEngine
impl ExecPolicyEngine
pub fn new(trusted_prefixes: Vec<String>, denied_prefixes: Vec<String>) -> Self
pub fn remember_session_approval(&mut self, approval_key: String)
pub fn is_session_approved(&self, approval_key: &str) -> bool
pub fn check(&self, ctx: ExecPolicyContext<'_>) -> Result<ExecPolicyDecision>
Trait Implementations§
Source§impl Clone for ExecPolicyEngine
impl Clone for ExecPolicyEngine
Source§fn clone(&self) -> ExecPolicyEngine
fn clone(&self) -> ExecPolicyEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecPolicyEngine
impl Debug for ExecPolicyEngine
Source§impl Default for ExecPolicyEngine
impl Default for ExecPolicyEngine
Source§fn default() -> ExecPolicyEngine
fn default() -> ExecPolicyEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecPolicyEngine
impl RefUnwindSafe for ExecPolicyEngine
impl Send for ExecPolicyEngine
impl Sync for ExecPolicyEngine
impl Unpin for ExecPolicyEngine
impl UnsafeUnpin for ExecPolicyEngine
impl UnwindSafe for ExecPolicyEngine
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