pub struct PolicyStoreGate { /* private fields */ }Expand description
Wraps an agentstategraph_policy::PolicyStore. Rules from the JSON policy
file are imported into a dedicated in-memory ASG repo at construction;
all evaluation is then delegated to the real PolicyStore engine.
Using a separate in-memory repo (rather than the main ASD repo) keeps
policy storage isolated and avoids requiring Repository: Clone.
Implementations§
Source§impl PolicyStoreGate
impl PolicyStoreGate
Sourcepub fn from_file(path: &Path) -> Result<Self>
pub fn from_file(path: &Path) -> Result<Self>
Load path as a PolicyFile, import every rule into a fresh
in-memory ASG repo, and return a gate ready for evaluation.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PolicyStoreGate
impl !UnwindSafe for PolicyStoreGate
impl Freeze for PolicyStoreGate
impl Send for PolicyStoreGate
impl Sync for PolicyStoreGate
impl Unpin for PolicyStoreGate
impl UnsafeUnpin for PolicyStoreGate
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