pub struct DeclarationSnapshot { /* private fields */ }Expand description
DeclarationSnapshot
Immutable runtime declaration snapshot ready for policy and ownership validation.
Construction and decoding enforce the declaration count and unique keys and
slots. A snapshot is still
not permission to open storage. Integrations should call
crate::validate_allocations, commit the staged generation, and only then
expose committed allocation authority.
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 declarations(&self) -> &[AllocationDeclaration]
pub fn declarations(&self) -> &[AllocationDeclaration]
Borrow the sealed declarations.
Trait Implementations§
Source§impl Clone for DeclarationSnapshot
impl Clone for DeclarationSnapshot
Source§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<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DeclarationSnapshot
Source§impl PartialEq for DeclarationSnapshot
impl PartialEq for DeclarationSnapshot
Source§impl Serialize for DeclarationSnapshot
impl Serialize 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