pub struct MemoryApi;Expand description
MemoryApi
Implementations§
Source§impl MemoryApi
impl MemoryApi
Sourcepub fn bootstrap_owner_range(
crate_name: &'static str,
start: u8,
end: u8,
) -> Result<(), MemoryRegistryError>
pub fn bootstrap_owner_range( crate_name: &'static str, start: u8, end: u8, ) -> Result<(), MemoryRegistryError>
Bootstrap eager TLS, eager-init hooks, and the caller’s initial reserved range.
Sourcepub fn bootstrap_pending() -> Result<(), MemoryRegistryError>
pub fn bootstrap_pending() -> Result<(), MemoryRegistryError>
Bootstrap eager TLS, eager-init hooks, and flush deferred registry state without reserving a new owner range.
Sourcepub fn register(
id: u8,
crate_name: &str,
label: &str,
) -> Result<VirtualMemory<DefaultMemoryImpl>, MemoryRegistryError>
pub fn register( 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_owner_range(...) first so the caller’s owned range is reserved.
Sourcepub fn inspect(id: u8) -> Option<MemoryInspection>
pub fn inspect(id: u8) -> Option<MemoryInspection>
Inspect who currently owns one memory id and whether it is registered.
Sourcepub fn registered() -> Vec<RegisteredMemory>
pub fn registered() -> Vec<RegisteredMemory>
List every registered memory slot with owner/range/label context.
Sourcepub fn registered_for_owner(owner: &str) -> Vec<RegisteredMemory>
pub fn registered_for_owner(owner: &str) -> Vec<RegisteredMemory>
List all registered memory slots for one owner.
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