pub struct MemoryType { /* private fields */ }Expand description
Memory types classify linear memories and their size range. The limits constrain the minimum and optionally the maximum size of a memory. The limits are given in units of page size.
See https://webassembly.github.io/spec/core/syntax/types.html#memory-types
§Examples
use wasm_ast::{Limit, MemoryType};
let limit = Limit::unbounded(0);
let memory_type = MemoryType::new(limit.clone());
assert_eq!(memory_type.limits(), &limit);
assert_eq!(memory_type, limit.into());Implementations§
Trait Implementations§
Source§impl Clone for MemoryType
 
impl Clone for MemoryType
Source§fn clone(&self) -> MemoryType
 
fn clone(&self) -> MemoryType
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 MemoryType
 
impl Debug for MemoryType
Source§impl From<Limit> for MemoryType
 
impl From<Limit> for MemoryType
Source§impl PartialEq for MemoryType
 
impl PartialEq for MemoryType
impl Copy for MemoryType
impl Eq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations§
impl Freeze for MemoryType
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnwindSafe for MemoryType
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