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
Auto Trait Implementations§
impl RefUnwindSafe for FuncTypeBuilder
impl Send for FuncTypeBuilder
impl Sync for FuncTypeBuilder
impl Unpin for FuncTypeBuilder
impl UnwindSafe for FuncTypeBuilder
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