pub struct ValidatedAllocations { /* private fields */ }Expand description
ValidatedAllocations
Pre-commit allocation declarations accepted by policy and historical ledger validation.
This value is produced by crate::validate_allocations and may be staged
into the next ledger generation. It cannot open storage. Only a
CommittedAllocations capability confirmed after persistence can do that.
This is an in-memory capability, not a serde DTO. It has no public constructor and should only be produced by validation or bootstrap paths. Its declarations have valid schema metadata and at most 255 unique keys and slots. These facts are established before the proof is constructed. The base generation has passed bounded ownership validation.
Implementations§
Source§impl ValidatedAllocations
impl ValidatedAllocations
Sourcepub fn base_generation(&self) -> u64
pub fn base_generation(&self) -> u64
Return the recovered generation used as the validation base.
Sourcepub fn declarations(&self) -> &[AllocationDeclaration]
pub fn declarations(&self) -> &[AllocationDeclaration]
Borrow the validated declarations.
Sourcepub fn slot_for(&self, key: &StableKey) -> Option<&MemoryManagerSlot>
pub fn slot_for(&self, key: &StableKey) -> Option<&MemoryManagerSlot>
Find a validated slot by stable key.