pub struct TypeSection { /* private fields */ }
Expand description
An encoder for the type section of WebAssembly modules.
§Example
use wasm_encoder::{Module, TypeSection, ValType};
let mut types = TypeSection::new();
types.ty().function([ValType::I32, ValType::I32], [ValType::I64]);
let mut module = Module::new();
module.section(&types);
let bytes = module.finish();
Implementations§
Source§impl TypeSection
impl TypeSection
Trait Implementations§
Source§impl Clone for TypeSection
impl Clone for TypeSection
Source§fn clone(&self) -> TypeSection
fn clone(&self) -> TypeSection
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 TypeSection
impl Debug for TypeSection
Source§impl Default for TypeSection
impl Default for TypeSection
Source§fn default() -> TypeSection
fn default() -> TypeSection
Returns the “default value” for a type. Read more
Source§impl Encode for TypeSection
impl Encode for TypeSection
Auto Trait Implementations§
impl Freeze for TypeSection
impl RefUnwindSafe for TypeSection
impl Send for TypeSection
impl Sync for TypeSection
impl Unpin for TypeSection
impl UnwindSafe for TypeSection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)