Struct wasmer_ruby::Wasmer::FunctionType
source · pub struct FunctionType;
Expand description
Represents the signature of a function that is either implemented in WebAssembly module or exposed to WebAssembly by the host.
WebAssembly functions can have 0 or more parameters and results.
Implementations§
source§impl FunctionType
impl FunctionType
sourcepub fn new(params: Array<Type>, results: Array<Type>) -> Self
pub fn new(params: Array<Type>, results: Array<Type>) -> Self
Creates a new FunctionType
.
Example
function_type = Wasmer::FunctionType.new(
[Wasmer::Type::I32, Wasmer::Type::I64],
[Wasmer::Type::I32]
)
Auto Trait Implementations§
impl RefUnwindSafe for FunctionType
impl Send for FunctionType
impl Sync for FunctionType
impl Unpin for FunctionType
impl UnwindSafe for FunctionType
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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