pub struct SandboxPolicy {
pub policy_ref: PolicyRef,
pub mode: SandboxMode,
pub network: NetworkPolicy,
pub missing_adapter_decision: PolicyDecision,
}Expand description
Defines the sandbox policy SDK value. Construction records local state only; documented runtimes, executors, or ports own side effects.
Fields§
§policy_ref: PolicyRefPolicy reference that must be resolved by the host or runtime before execution.
mode: SandboxModeMode that selects how this operation or contract should behave. Callers use it to choose the explicit execution path instead of relying on hidden defaults.
network: NetworkPolicyWhether the request asks for network access. Host sandbox policy is still authoritative.
missing_adapter_decision: PolicyDecisionMissing adapter decision used by this record or request.
Implementations§
Source§impl SandboxPolicy
impl SandboxPolicy
Sourcepub fn host_denied(policy_ref: PolicyRef) -> Self
pub fn host_denied(policy_ref: PolicyRef) -> Self
Builds the host denied value. This is data construction and performs no I/O, journal append, event publication, or process work.
Sourcepub fn evaluate(&self, adapter_available: bool) -> PolicyOutcome
pub fn evaluate(&self, adapter_available: bool) -> PolicyOutcome
Builds the evaluate value. This is data construction and performs no I/O, journal append, event publication, or process work.
Trait Implementations§
Source§impl Clone for SandboxPolicy
impl Clone for SandboxPolicy
Source§fn clone(&self) -> SandboxPolicy
fn clone(&self) -> SandboxPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SandboxPolicy
impl Debug for SandboxPolicy
Source§impl<'de> Deserialize<'de> for SandboxPolicy
impl<'de> Deserialize<'de> for SandboxPolicy
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>,
Source§impl PartialEq for SandboxPolicy
impl PartialEq for SandboxPolicy
Source§fn eq(&self, other: &SandboxPolicy) -> bool
fn eq(&self, other: &SandboxPolicy) -> bool
self and other values to be equal, and is used by ==.