Struct wasmedge_sdk::FuncTypeBuilder
source · pub struct FuncTypeBuilder { /* private fields */ }
Expand description
Defines a type builder for creating a FuncType instance.
Implementations§
source§impl FuncTypeBuilder
impl FuncTypeBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new FuncTypeBuilder.
sourcepub fn with_args(self, args: impl IntoIterator<Item = ValType>) -> Self
pub fn with_args(self, args: impl IntoIterator<Item = ValType>) -> Self
Adds arguments to the function type.
Argument
args
specifies the arguments to be added to the function type.
sourcepub fn with_arg(self, arg: ValType) -> Self
pub fn with_arg(self, arg: ValType) -> Self
Adds a single argument to the function type.
Argument
arg
specifies the argument to be added to the function type.
sourcepub fn with_returns(self, returns: impl IntoIterator<Item = ValType>) -> Self
pub fn with_returns(self, returns: impl IntoIterator<Item = ValType>) -> Self
Adds returns to the function type.
Argument
returns
specifies the returns to be added to the function type.
sourcepub fn with_return(self, ret: ValType) -> Self
pub fn with_return(self, ret: ValType) -> Self
Adds a single return to the function type.
Argument
ret
specifies the return to be added to the function type.
Trait Implementations§
source§impl Debug for FuncTypeBuilder
impl Debug for FuncTypeBuilder
source§impl Default for FuncTypeBuilder
impl Default for FuncTypeBuilder
source§fn default() -> FuncTypeBuilder
fn default() -> FuncTypeBuilder
Returns the “default value” for a type. Read more