pub struct MemoryGovernanceConfig {
pub enabled: bool,
pub store_allowlist: Vec<String>,
pub max_memory_entries: Option<u64>,
pub max_retention_ttl_secs: Option<u64>,
pub max_content_size_bytes: Option<u64>,
pub deny_patterns: Vec<String>,
}Expand description
Configuration for MemoryGovernanceGuard.
Fields§
§enabled: boolEnable/disable the guard entirely.
store_allowlist: Vec<String>Hard-coded store allowlist applied on top of the capability-level
Constraint::MemoryStoreAllowlist. Empty means “no additional
allowlist” (capability-level list still applies).
max_memory_entries: Option<u64>Maximum memory-entry count per agent + session combination. When
Some(n), the n-th write is denied.
max_retention_ttl_secs: Option<u64>Maximum retention TTL (seconds) allowed on a single write. When
Some(ttl), writes requesting a larger TTL – or indefinite
retention (missing TTL) – are denied.
max_content_size_bytes: Option<u64>Maximum content size (bytes) for a single memory write. None
disables the check.
deny_patterns: Vec<String>Extra regex patterns that deny a write when the content matches.
Trait Implementations§
Source§impl Clone for MemoryGovernanceConfig
impl Clone for MemoryGovernanceConfig
Source§fn clone(&self) -> MemoryGovernanceConfig
fn clone(&self) -> MemoryGovernanceConfig
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 MemoryGovernanceConfig
impl Debug for MemoryGovernanceConfig
Source§impl Default for MemoryGovernanceConfig
impl Default for MemoryGovernanceConfig
Source§impl<'de> Deserialize<'de> for MemoryGovernanceConfig
impl<'de> Deserialize<'de> for MemoryGovernanceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MemoryGovernanceConfig
impl RefUnwindSafe for MemoryGovernanceConfig
impl Send for MemoryGovernanceConfig
impl Sync for MemoryGovernanceConfig
impl Unpin for MemoryGovernanceConfig
impl UnsafeUnpin for MemoryGovernanceConfig
impl UnwindSafe for MemoryGovernanceConfig
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