pub enum TypeDef {
    Func(FuncType),
    Module(ModuleType),
    ModuleInstance(ModuleInstanceType),
    Component(ComponentType),
    Instance(InstanceType),
    ComponentFunc(ComponentFuncType),
    Value(InterfaceTypeRef),
    Interface(InterfaceType),
}
Expand description

A unified type definition for inspecting WebAssembly modules and components.

Variants§

§

Func(FuncType)

The definition is for a core function type.

§

Module(ModuleType)

The definition is for a module type.

This variant is only supported when parsing a component.

§

ModuleInstance(ModuleInstanceType)

The definition is for a module instance type.

This variant is only supported when parsing a component.

§

Component(ComponentType)

The definition is for a component type.

This variant is only supported when parsing a component.

§

Instance(InstanceType)

The definition is for an instance type.

This variant is only supported when parsing a component.

§

ComponentFunc(ComponentFuncType)

The definition is for a component function type.

This variant is only supported when parsing a component.

§

Value(InterfaceTypeRef)

The definition is for a value type.

This variant is only supported when parsing a component.

§

Interface(InterfaceType)

The definition is for an interface type.

This variant is only supported when parsing a component.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.