pub enum InstanceKind<'a> {
Import {
import: InlineImport<'a>,
ty: ComponentTypeUse<'a, InstanceType<'a>>,
},
Instantiate {
component: ItemRef<'a, component>,
args: Vec<InstantiationArg<'a>>,
},
BundleOfExports(Vec<ComponentExport<'a>>),
}Available on crate feature
component-model only.Expand description
The kinds of instances in the text format.
Variants§
Import
The (instance (import "x")) sugar syntax
Fields
§
import: InlineImport<'a>The name of the import
§
ty: ComponentTypeUse<'a, InstanceType<'a>>The type of the instance being imported
Instantiate
Instantiate a component.
Fields
§
args: Vec<InstantiationArg<'a>>Arguments used to instantiate the instance.
BundleOfExports(Vec<ComponentExport<'a>>)
The instance is defined by exporting local items as an instance.
Trait Implementations§
Source§impl<'a> Debug for InstanceKind<'a>
impl<'a> Debug for InstanceKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for InstanceKind<'a>
impl<'a> RefUnwindSafe for InstanceKind<'a>
impl<'a> Send for InstanceKind<'a>
impl<'a> Sync for InstanceKind<'a>
impl<'a> Unpin for InstanceKind<'a>
impl<'a> UnwindSafe for InstanceKind<'a>
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