pub struct PolicyEngine { /* private fields */ }Implementations§
Source§impl PolicyEngine
impl PolicyEngine
pub fn new() -> Self
Sourcepub fn config(&self) -> PolicyConfig
pub fn config(&self) -> PolicyConfig
Get a snapshot of the current policy config.
Sourcepub fn check(&self, agent_id: &str, tool_name: &str) -> PolicyResult
pub fn check(&self, agent_id: &str, tool_name: &str) -> PolicyResult
Check if an agent is allowed to call a tool.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PolicyEngine
impl RefUnwindSafe for PolicyEngine
impl Send for PolicyEngine
impl Sync for PolicyEngine
impl Unpin for PolicyEngine
impl UnsafeUnpin for PolicyEngine
impl UnwindSafe for PolicyEngine
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