pub struct DeclarationSnapshot { /* private fields */ }Expand description
DeclarationSnapshot
Immutable runtime declaration snapshot ready for policy and history validation.
Implementations§
Source§impl DeclarationSnapshot
impl DeclarationSnapshot
Sourcepub fn new(
declarations: Vec<AllocationDeclaration>,
) -> Result<Self, DeclarationSnapshotError>
pub fn new( declarations: Vec<AllocationDeclaration>, ) -> Result<Self, DeclarationSnapshotError>
Create and validate a declaration snapshot.
Sourcepub fn with_runtime_fingerprint(self, fingerprint: impl Into<String>) -> Self
pub fn with_runtime_fingerprint(self, fingerprint: impl Into<String>) -> Self
Attach an optional runtime fingerprint.
Sourcepub fn declarations(&self) -> &[AllocationDeclaration]
pub fn declarations(&self) -> &[AllocationDeclaration]
Borrow the sealed declarations.
Sourcepub fn runtime_fingerprint(&self) -> Option<&str>
pub fn runtime_fingerprint(&self) -> Option<&str>
Borrow the optional runtime fingerprint.
Trait Implementations§
Source§impl Clone for DeclarationSnapshot
impl Clone for DeclarationSnapshot
Source§fn clone(&self) -> DeclarationSnapshot
fn clone(&self) -> DeclarationSnapshot
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 DeclarationSnapshot
impl Debug for DeclarationSnapshot
Source§impl<'de> Deserialize<'de> for DeclarationSnapshot
impl<'de> Deserialize<'de> for DeclarationSnapshot
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
Source§impl PartialEq for DeclarationSnapshot
impl PartialEq for DeclarationSnapshot
Source§fn eq(&self, other: &DeclarationSnapshot) -> bool
fn eq(&self, other: &DeclarationSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DeclarationSnapshot
impl Serialize for DeclarationSnapshot
impl Eq for DeclarationSnapshot
impl StructuralPartialEq for DeclarationSnapshot
Auto Trait Implementations§
impl Freeze for DeclarationSnapshot
impl RefUnwindSafe for DeclarationSnapshot
impl Send for DeclarationSnapshot
impl Sync for DeclarationSnapshot
impl Unpin for DeclarationSnapshot
impl UnsafeUnpin for DeclarationSnapshot
impl UnwindSafe for DeclarationSnapshot
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