pub trait FunctionData {
// Required methods
fn name(&self) -> &str;
fn return_kind(&self) -> ReturnKind;
fn is_method(&self) -> bool;
}Expand description
Metadata about a function declared by an interface.
Provides information needed during linking to wire up cross-plugin dispatch.
Each function in an interface needs metadata so wasm_link knows how to
handle calls across plugin boundaries.
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
Returns the function’s name as defined per the WebAssembly component model
specifications and WIT standards (e.g. get-value, [constructor]counter,
[method]counter.increment).
Sourcefn return_kind(&self) -> ReturnKind
fn return_kind(&self) -> ReturnKind
Returns the function’s return kind. wasm_link may do some mapping on the
returned value. This can be used to tell it to skip certain steps as it is
known ahead of the time that they are not needed.