Struct wasm_encoder::MemorySection [−][src]
An encoder for the memory section.
Example
use wasm_encoder::{Module, MemorySection, MemoryType, Limits}; let mut memories = MemorySection::new(); memories.memory(MemoryType { limits: Limits { min: 1, max: None, }, }); let mut module = Module::new(); module.section(&memories); let wasm_bytes = module.finish();
Implementations
impl MemorySection
[src][−]
pub fn new() -> MemorySection
[src][−]
Create a new memory section encoder.
pub fn memory(&mut self, memory_type: MemoryType) -> &mut Self
[src][−]
Define a memory.
Trait Implementations
impl Clone for MemorySection
[src][+]
impl Debug for MemorySection
[src][+]
impl Section for MemorySection
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for MemorySection
impl Send for MemorySection
impl Sync for MemorySection
impl Unpin for MemorySection
impl UnwindSafe for MemorySection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,