pub struct AgentAccessPolicy {
pub allowed_scopes: Vec<String>,
pub allow_unspecified_scope: bool,
pub max_limit: usize,
pub max_context_bytes: usize,
pub max_runtime_ms: u64,
pub allow_remote_clients: bool,
}Expand description
Local access policy applied before agent protocol requests reach services.
Fields§
§allowed_scopes: Vec<String>§allow_unspecified_scope: bool§max_limit: usize§max_context_bytes: usize§max_runtime_ms: u64§allow_remote_clients: boolImplementations§
Source§impl AgentAccessPolicy
impl AgentAccessPolicy
pub const DEFAULT_MAX_LIMIT: usize = 10
pub const DEFAULT_MAX_CONTEXT_BYTES: usize = 65_536
Sourcepub fn new(
allowed_scopes: Vec<String>,
allow_unspecified_scope: bool,
max_limit: usize,
max_context_bytes: usize,
max_runtime_ms: u64,
allow_remote_clients: bool,
) -> Result<Self, AgentPolicyError>
pub fn new( allowed_scopes: Vec<String>, allow_unspecified_scope: bool, max_limit: usize, max_context_bytes: usize, max_runtime_ms: u64, allow_remote_clients: bool, ) -> Result<Self, AgentPolicyError>
Creates a validated access policy for agent protocol adapters.
Sourcepub fn summary(&self) -> AgentAccessPolicySummary
pub fn summary(&self) -> AgentAccessPolicySummary
Summarizes policy without exposing scope names or secrets.
Trait Implementations§
Source§impl Clone for AgentAccessPolicy
impl Clone for AgentAccessPolicy
Source§fn clone(&self) -> AgentAccessPolicy
fn clone(&self) -> AgentAccessPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentAccessPolicy
impl Debug for AgentAccessPolicy
impl Eq for AgentAccessPolicy
Source§impl PartialEq for AgentAccessPolicy
impl PartialEq for AgentAccessPolicy
impl StructuralPartialEq for AgentAccessPolicy
Auto Trait Implementations§
impl Freeze for AgentAccessPolicy
impl RefUnwindSafe for AgentAccessPolicy
impl Send for AgentAccessPolicy
impl Sync for AgentAccessPolicy
impl Unpin for AgentAccessPolicy
impl UnsafeUnpin for AgentAccessPolicy
impl UnwindSafe for AgentAccessPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.