Trait Instantiatable

Source
pub trait Instantiatable: Artifact {
    type Error: Error + Send + Sync;

    // Required method
    unsafe fn instantiate(
        self: Arc<Self>,
        tunables: &dyn Tunables,
        resolver: &dyn Resolver,
        host_state: Box<dyn Any>,
        config: InstanceConfig,
    ) -> Result<InstanceHandle, Self::Error>;
}
Expand description

Artifacts that can be instantiated.

Required Associated Types§

Source

type Error: Error + Send + Sync

The errors that can occur when instantiating.

Required Methods§

Source

unsafe fn instantiate( self: Arc<Self>, tunables: &dyn Tunables, resolver: &dyn Resolver, host_state: Box<dyn Any>, config: InstanceConfig, ) -> Result<InstanceHandle, Self::Error>

Crate an Instance from this Artifact.

§Safety

See InstanceHandle::new.

Implementors§