Struct wasmer_ruby::Wasmer::MemoryType
source · pub struct MemoryType;
Expand description
A descriptor for a WebAssembly memory type.
Memories are described in units of pages (64Kb) and represent contiguous chunks of addressable memory.
Implementations§
source§impl MemoryType
impl MemoryType
sourcepub fn minimum(&self) -> Integer
pub fn minimum(&self) -> Integer
Returns the minimum size of the memory.
Example
memory_type = Wasmer::MemoryType.new 1, 3, true
assert { memory_type.minimum == 1 }
sourcepub fn maximum(&self) -> Option<Integer>
pub fn maximum(&self) -> Option<Integer>
Returns the maximum size of the memory of any.
Example
memory_type = Wasmer::MemoryType.new 1, 3, true
assert { memory_type.maximum == 3 }
Returns whether the memory is shared or not.
Example
memory_type = Wasmer::MemoryType.new 1, 3, true
assert { memory_type.shared? }
Auto Trait Implementations§
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnwindSafe for MemoryType
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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