pub struct MemoryRegistryRuntime;Expand description
MemoryRegistryRuntime
Substrate runtime controller responsible for initializing the global memory registry.
This type performs mechanical coordination only:
- ordering
- conflict detection
- idempotent initialization
It encodes no application semantics.
Implementations§
Source§impl MemoryRegistryRuntime
impl MemoryRegistryRuntime
Sourcepub fn init(
initial_range: Option<(&str, u8, u8)>,
) -> Result<MemoryRegistryInitSummary, MemoryRegistryError>
pub fn init( initial_range: Option<(&str, u8, u8)>, ) -> Result<MemoryRegistryInitSummary, MemoryRegistryError>
Initialize the memory registry.
- Optionally reserves an initial range for the caller.
- Applies all deferred range reservations.
- Applies all deferred ID registrations.
This function is idempotent for the same initial range.
Sourcepub fn is_initialized() -> bool
pub fn is_initialized() -> bool
Return whether the memory registry has completed initialization.
Sourcepub fn snapshot_entries() -> Vec<(u8, MemoryRegistryEntry)>
pub fn snapshot_entries() -> Vec<(u8, MemoryRegistryEntry)>
Snapshot all registry entries.
Sourcepub fn snapshot_ranges() -> Vec<(String, MemoryRange)>
pub fn snapshot_ranges() -> Vec<(String, MemoryRange)>
Snapshot all reserved memory ranges.
Sourcepub fn snapshot_range_entries() -> Vec<MemoryRangeEntry>
pub fn snapshot_range_entries() -> Vec<MemoryRangeEntry>
Snapshot all reserved memory ranges with owners.
Sourcepub fn snapshot_ids_by_range() -> Vec<MemoryRangeSnapshot>
pub fn snapshot_ids_by_range() -> Vec<MemoryRangeSnapshot>
Snapshot registry entries grouped by range.
Sourcepub fn get(id: u8) -> Option<MemoryRegistryEntry>
pub fn get(id: u8) -> Option<MemoryRegistryEntry>
Retrieve a single registry entry by ID.
Sourcepub fn validated_allocations() -> Result<ValidatedAllocations, MemoryRegistryError>
pub fn validated_allocations() -> Result<ValidatedAllocations, MemoryRegistryError>
Return the sealed validated allocation set published by bootstrap.
Sourcepub fn commit_pending_if_initialized() -> Result<(), MemoryRegistryError>
pub fn commit_pending_if_initialized() -> Result<(), MemoryRegistryError>
Apply any newly deferred registrations/ranges after runtime init.
This is a no-op until initialization has completed. Once initialized, this drains pending range/ID registrations so lazily touched statics can become visible during the same request.