pub struct MemoryApi;Expand description
MemoryApi
Implementations§
Source§impl MemoryApi
impl MemoryApi
Sourcepub fn bootstrap_registry(
crate_name: &'static str,
start: u8,
end: u8,
) -> Result<MemoryRegistryInitSummary, MemoryRegistryError>
pub fn bootstrap_registry( crate_name: &'static str, start: u8, end: u8, ) -> Result<MemoryRegistryInitSummary, MemoryRegistryError>
Bootstrap eager TLS, eager-init hooks, and the caller’s initial reserved range.
Sourcepub fn register_memory(
id: u8,
crate_name: &str,
label: &str,
) -> Result<VirtualMemory<DefaultMemoryImpl>, MemoryRegistryError>
pub fn register_memory( id: u8, crate_name: &str, label: &str, ) -> Result<VirtualMemory<DefaultMemoryImpl>, MemoryRegistryError>
Register one stable-memory ID and return its opened virtual memory handle.
Call bootstrap_registry(...) first so the caller’s owned range is reserved.
Sourcepub fn inspect_memory(id: u8) -> Option<MemoryInspection>
pub fn inspect_memory(id: u8) -> Option<MemoryInspection>
Inspect who currently owns one memory id and whether it is registered.
Sourcepub fn registered_memories() -> Vec<RegisteredMemory>
pub fn registered_memories() -> Vec<RegisteredMemory>
List every registered memory slot with owner/range/label context.
Sourcepub fn registered_memories_for_owner(owner: &str) -> Vec<RegisteredMemory>
pub fn registered_memories_for_owner(owner: &str) -> Vec<RegisteredMemory>
List all registered memory slots for one owner.
Sourcepub fn find_registered_memory(
owner: &str,
label: &str,
) -> Option<RegisteredMemory>
pub fn find_registered_memory( owner: &str, label: &str, ) -> Option<RegisteredMemory>
Find one registered memory slot by owner and label.
Auto Trait Implementations§
impl Freeze for MemoryApi
impl RefUnwindSafe for MemoryApi
impl Send for MemoryApi
impl Sync for MemoryApi
impl Unpin for MemoryApi
impl UnsafeUnpin for MemoryApi
impl UnwindSafe for MemoryApi
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