pub struct CanisterStableMemory {}๐Deprecated since 0.18.0: The
api::stable module has been moved to stable (crate root).Expand description
A standard implementation of StableMemory.
Useful for creating StableWriter and StableReader.
Trait Implementationsยง
Sourceยงimpl Clone for CanisterStableMemory
impl Clone for CanisterStableMemory
Sourceยงfn clone(&self) -> CanisterStableMemory
fn clone(&self) -> CanisterStableMemory
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for CanisterStableMemory
impl Debug for CanisterStableMemory
Sourceยงimpl Default for CanisterStableMemory
impl Default for CanisterStableMemory
Sourceยงfn default() -> CanisterStableMemory
fn default() -> CanisterStableMemory
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl StableMemory for CanisterStableMemory
impl StableMemory for CanisterStableMemory
Sourceยงfn stable_size(&self) -> u64
fn stable_size(&self) -> u64
๐Deprecated since 0.18.0: The
api::stable module has been moved to stable (crate root).Gets current size of the stable memory (in WASM pages).
Sourceยงfn stable_grow(&self, new_pages: u64) -> Result<u64, StableMemoryError>
fn stable_grow(&self, new_pages: u64) -> Result<u64, StableMemoryError>
๐Deprecated since 0.18.0: The
api::stable module has been moved to stable (crate root).Attempts to grow the stable memory by
new_pages (added pages). Read moreSourceยงfn stable_write(&self, offset: u64, buf: &[u8])
fn stable_write(&self, offset: u64, buf: &[u8])
๐Deprecated since 0.18.0: The
api::stable module has been moved to stable (crate root).Writes data to the stable memory location specified by an offset. Read more
Sourceยงfn stable_read(&self, offset: u64, buf: &mut [u8])
fn stable_read(&self, offset: u64, buf: &mut [u8])
๐Deprecated since 0.18.0: The
api::stable module has been moved to stable (crate root).Reads data from the stable memory location specified by an offset.
impl Copy for CanisterStableMemory
Auto Trait Implementationsยง
impl Freeze for CanisterStableMemory
impl RefUnwindSafe for CanisterStableMemory
impl Send for CanisterStableMemory
impl Sync for CanisterStableMemory
impl Unpin for CanisterStableMemory
impl UnwindSafe for CanisterStableMemory
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