Struct ic_stable_structures::RestrictedMemory
source · [−]pub struct RestrictedMemory<M: Memory> { /* private fields */ }
Expand description
RestrictedMemory creates a limited view of another memory. This allows one to divide the main memory into non-intersecting ranges and use different layouts in each region.
Implementations
Trait Implementations
sourceimpl<M: Clone + Memory> Clone for RestrictedMemory<M>
impl<M: Clone + Memory> Clone for RestrictedMemory<M>
sourcefn clone(&self) -> RestrictedMemory<M>
fn clone(&self) -> RestrictedMemory<M>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<M: Memory> Memory for RestrictedMemory<M>
impl<M: Memory> Memory for RestrictedMemory<M>
sourcefn size(&self) -> u64
fn size(&self) -> u64
Returns the current size of the stable memory in WebAssembly
pages. (One WebAssembly page is 64Ki bytes.) Read more
sourcefn grow(&self, delta: u64) -> i64
fn grow(&self, delta: u64) -> i64
Tries to grow the memory by new_pages many pages containing
zeroes. If successful, returns the previous size of the
memory (in pages). Otherwise, returns -1. Read more
Auto Trait Implementations
impl<M> RefUnwindSafe for RestrictedMemory<M>where
M: RefUnwindSafe,
impl<M> Send for RestrictedMemory<M>where
M: Send,
impl<M> Sync for RestrictedMemory<M>where
M: Sync,
impl<M> Unpin for RestrictedMemory<M>where
M: Unpin,
impl<M> UnwindSafe for RestrictedMemory<M>where
M: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more