pub struct FunctionMetadata<'a> {
pub signature: UniqueSignatureIndex,
pub name: Option<&'a str>,
}
Expand description
Information about the corresponding function.
This is split from but closely related to a FunctionSpec
. The distinction is largely for
serialization/deserialization simplicity, as FunctionSpec
contains fields that need
cooperation from a loader, with manual layout and serialization as a result.
FunctionMetadata
is the remainder of fields that can be automatically
serialized/deserialied and are small enough copying isn’t a large concern.
Fields§
§signature: UniqueSignatureIndex
§name: Option<&'a str>
the “name” field is some human-friendly name, not necessarily the same as used to reach this function (through an export, for example), and may not even indicate that a function is exported at all. TODO: at some point when possible, this field ought to be set from the names section of a wasm module. At the moment that information is lost at parse time.
Trait Implementations§
Source§impl<'a> Clone for FunctionMetadata<'a>
impl<'a> Clone for FunctionMetadata<'a>
Source§fn clone(&self) -> FunctionMetadata<'a>
fn clone(&self) -> FunctionMetadata<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more