pub struct MemoryGovernanceGuard { /* private fields */ }Expand description
Guard implementing memory governance (phase 18.1).
Implementations§
Source§impl MemoryGovernanceGuard
impl MemoryGovernanceGuard
Sourcepub fn new() -> Self
pub fn new() -> Self
Build a guard with default configuration (no limits). Non-guard code paths remain fully permissive until a capability constraint or config field is supplied.
Sourcepub fn with_config(
config: MemoryGovernanceConfig,
) -> Result<Self, MemoryGovernanceError>
pub fn with_config( config: MemoryGovernanceConfig, ) -> Result<Self, MemoryGovernanceError>
Build a guard with explicit configuration.
Sourcepub fn session_count(&self, agent_id: &str, capability_id: &str) -> u64
pub fn session_count(&self, agent_id: &str, capability_id: &str) -> u64
Current counter value for a session (test / observability helper).
Trait Implementations§
Source§impl Default for MemoryGovernanceGuard
impl Default for MemoryGovernanceGuard
Auto Trait Implementations§
impl !Freeze for MemoryGovernanceGuard
impl RefUnwindSafe for MemoryGovernanceGuard
impl Send for MemoryGovernanceGuard
impl Sync for MemoryGovernanceGuard
impl Unpin for MemoryGovernanceGuard
impl UnsafeUnpin for MemoryGovernanceGuard
impl UnwindSafe for MemoryGovernanceGuard
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