Struct wasm_encoder::ComponentFunctionSection 
source · [−]pub struct ComponentFunctionSection { /* private fields */ }Expand description
An encoder for the function section of WebAssembly components.
Example
use wasm_encoder::{Component, ComponentFunctionSection, CanonicalOption};
let mut functions = ComponentFunctionSection::new();
functions.lift(0, 0, [CanonicalOption::UTF8, CanonicalOption::Into(0)]);
let mut component = Component::new();
component.section(&functions);
let bytes = component.finish();Implementations
sourceimpl ComponentFunctionSection
 
impl ComponentFunctionSection
sourcepub fn lift<O>(
    &mut self, 
    type_index: u32, 
    func_index: u32, 
    options: O
) -> &mut Self where
    O: IntoIterator<Item = CanonicalOption>,
    O::IntoIter: ExactSizeIterator, 
 
pub fn lift<O>(
    &mut self, 
    type_index: u32, 
    func_index: u32, 
    options: O
) -> &mut Self where
    O: IntoIterator<Item = CanonicalOption>,
    O::IntoIter: ExactSizeIterator, 
Define a function that will lift a core WebAssembly function to the canonical interface ABI.
sourcepub fn lower<O>(&mut self, func_index: u32, options: O) -> &mut Self where
    O: IntoIterator<Item = CanonicalOption>,
    O::IntoIter: ExactSizeIterator, 
 
pub fn lower<O>(&mut self, func_index: u32, options: O) -> &mut Self where
    O: IntoIterator<Item = CanonicalOption>,
    O::IntoIter: ExactSizeIterator, 
Define a function that will lower a canonical interface ABI function to a core WebAssembly function.
Trait Implementations
sourceimpl Clone for ComponentFunctionSection
 
impl Clone for ComponentFunctionSection
sourcefn clone(&self) -> ComponentFunctionSection
 
fn clone(&self) -> ComponentFunctionSection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ComponentFunctionSection
 
impl Debug for ComponentFunctionSection
sourceimpl Default for ComponentFunctionSection
 
impl Default for ComponentFunctionSection
sourcefn default() -> ComponentFunctionSection
 
fn default() -> ComponentFunctionSection
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ComponentFunctionSection
impl Send for ComponentFunctionSection
impl Sync for ComponentFunctionSection
impl Unpin for ComponentFunctionSection
impl UnwindSafe for ComponentFunctionSection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more