PolicySnapshot
yosoi::policy::PolicySnapshot
pub struct PolicySnapshot
Immutable, validated policy values and their deterministic identity.
Source: crates/yosoi/src/internal/policy/snapshot.rs:7
SDK re-export: Source: crates/yosoi/src/policy.rs:3
Methods
Section titled “Methods”effective_policy
Section titled “effective_policy”pub fn effective_policy(&self) -> &EffectivePolicy
Returns the immutable policy behavior with Current selections expanded.
Source: crates/yosoi/src/internal/policy/snapshot.rs:35
from_policy
Section titled “from_policy”pub fn from_policy(policy: &yosoi::Policy) -> Result<Self, yosoi::PolicyError>
Validates and snapshots a caller-owned policy declaration.
The declaration remains available to the caller; the snapshot owns a validated clone, a Current-expanded behavior snapshot, and its deterministic effective identity.
Source: crates/yosoi/src/internal/policy/snapshot.rs:19
identity
Section titled “identity”pub const fn identity(&self) -> yosoi::EffectivePolicyIdentity
Returns the deterministic identity computed for this snapshot.
Source: crates/yosoi/src/internal/policy/snapshot.rs:40
policy
Section titled “policy”pub fn policy(&self) -> &yosoi::Policy
Returns the immutable policy value held by this snapshot.
Source: crates/yosoi/src/internal/policy/snapshot.rs:30
Trait implementations
Section titled “Trait implementations”Clone
fn clone(&self) -> yosoi::policy::PolicySnapshot
Debug
fn fmt(&self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
PartialEq
fn eq(&self, other: &yosoi::policy::PolicySnapshot) -> bool