pub struct NetworkPolicy {
pub enabled: bool,
pub allow_domains: Vec<String>,
pub deny_domains: Vec<String>,
}Expand description
P4c (S2 module 5 tools.web, S2.1 dep “network sandbox rules”, S17):
the network-domain policy a caller (SDK embedder) may install on a
ToolContext so crate::tools::WebFetchTool/crate::tools::WebSearchTool
respect it — see ToolContext::check_network. None on the context
(the default) means no policy is configured, matching today’s honest
gap (no P5 capabilities.permissions.sandbox.network engine exists
yet, C3 — tracked, not hidden).
Fields§
§enabled: boolWhether the policy is enforced at all. false behaves exactly like
None on the context.
allow_domains: Vec<String>If non-empty, only these hosts (exact match) are allowed.
deny_domains: Vec<String>These hosts (exact match) are always denied, even if also present in
allow_domains.
Trait Implementations§
Source§impl Clone for NetworkPolicy
impl Clone for NetworkPolicy
Source§fn clone(&self) -> NetworkPolicy
fn clone(&self) -> NetworkPolicy
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 NetworkPolicy
impl Debug for NetworkPolicy
Source§impl Default for NetworkPolicy
impl Default for NetworkPolicy
Source§fn default() -> NetworkPolicy
fn default() -> NetworkPolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NetworkPolicy
impl RefUnwindSafe for NetworkPolicy
impl Send for NetworkPolicy
impl Sync for NetworkPolicy
impl Unpin for NetworkPolicy
impl UnsafeUnpin for NetworkPolicy
impl UnwindSafe for NetworkPolicy
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