pub struct FunctionType {
pub signature: ModuleInternedTypeIndex,
pub func_ref: FuncRefIndex,
}
Expand description
Type information about functions in a wasm module.
Fields§
§signature: ModuleInternedTypeIndex
The type of this function, indexed into the module-wide type tables for a module compilation.
func_ref: FuncRefIndex
The index into the funcref table, if present. Note that this is
reserved_value()
if the function does not escape from a module.
Implementations§
Source§impl FunctionType
impl FunctionType
Sourcepub fn is_escaping(&self) -> bool
pub fn is_escaping(&self) -> bool
Returns whether this function’s type is one that “escapes” the current
module, meaning that the function is exported, used in ref.func
, used
in a table, etc.
Trait Implementations§
Source§impl Debug for FunctionType
impl Debug for FunctionType
Source§impl<'de> Deserialize<'de> for FunctionType
impl<'de> Deserialize<'de> for FunctionType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FunctionType
impl RefUnwindSafe for FunctionType
impl Send for FunctionType
impl Sync for FunctionType
impl Unpin for FunctionType
impl UnwindSafe for FunctionType
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