[][src]Struct parity_wasm::builder::FunctionBuilder

pub struct FunctionBuilder<F = Identity> { /* fields omitted */ }

Function definition builder

Methods

impl FunctionBuilder[src]

pub fn new() -> Self[src]

New function builder

impl<F> FunctionBuilder<F> where
    F: Invoke<FunctionDefinition>, 
[src]

pub fn with_callback(callback: F) -> Self[src]

New function builder with chained callback

pub fn main(self) -> Self[src]

Set that this function is main entry point

pub fn signature(self) -> SignatureBuilder<Self>[src]

Start signature builder of the function

pub fn with_signature(self, signature: Signature) -> Self[src]

Override current signature entirely with new one from known struct

pub fn body(self) -> FuncBodyBuilder<Self>[src]

Start code (body) builder

pub fn with_body(self, body: FuncBody) -> Self[src]

Set body (code) for this function

pub fn build(self) -> F::Result[src]

Finalize current builder spawning resulting struct in the callback

Auto Trait Implementations

impl<F> Send for FunctionBuilder<F> where
    F: Send

impl<F> Sync for FunctionBuilder<F> where
    F: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.