pub struct MemoryAllocation(/* private fields */);
Expand description
A memory allocation for a canister. Can be anywhere from 0 to 2^48 (i.e. 256 TiB) inclusive.
This represents the size, in bytes, that the IC guarantees to the canister and limits the canister to. If a canister attempts to exceed this value (and the value is nonzero), the attempt will fail. If 0, memory allocation is provided on a best-effort basis.
Trait Implementations§
source§impl Clone for MemoryAllocation
impl Clone for MemoryAllocation
source§fn clone(&self) -> MemoryAllocation
fn clone(&self) -> MemoryAllocation
Returns a copy 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 MemoryAllocation
impl Debug for MemoryAllocation
source§impl From<MemoryAllocation> for u64
impl From<MemoryAllocation> for u64
source§fn from(memory_allocation: MemoryAllocation) -> Self
fn from(memory_allocation: MemoryAllocation) -> Self
Converts to this type from the input type.
source§impl TryFrom<i16> for MemoryAllocation
impl TryFrom<i16> for MemoryAllocation
source§impl TryFrom<i32> for MemoryAllocation
impl TryFrom<i32> for MemoryAllocation
source§impl TryFrom<i64> for MemoryAllocation
impl TryFrom<i64> for MemoryAllocation
source§impl TryFrom<i8> for MemoryAllocation
impl TryFrom<i8> for MemoryAllocation
source§impl TryFrom<u16> for MemoryAllocation
impl TryFrom<u16> for MemoryAllocation
source§impl TryFrom<u32> for MemoryAllocation
impl TryFrom<u32> for MemoryAllocation
source§impl TryFrom<u64> for MemoryAllocation
impl TryFrom<u64> for MemoryAllocation
source§impl TryFrom<u8> for MemoryAllocation
impl TryFrom<u8> for MemoryAllocation
impl Copy for MemoryAllocation
Auto Trait Implementations§
impl Freeze for MemoryAllocation
impl RefUnwindSafe for MemoryAllocation
impl Send for MemoryAllocation
impl Sync for MemoryAllocation
impl Unpin for MemoryAllocation
impl UnwindSafe for MemoryAllocation
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