pub trait ComponentLoader<T: RuntimeFactors, U>: Sync {
// Required method
fn load_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine,
component: &'life2 AppComponent<'_>,
) -> Pin<Box<dyn Future<Output = Result<Component>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn load_instance_pre<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine<InstanceState<T::InstanceState, U>>,
component: &'life2 AppComponent<'_>,
) -> Pin<Box<dyn Future<Output = Result<InstancePre<InstanceState<T::InstanceState, U>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}
Expand description
A ComponentLoader is responsible for loading Wasmtime Component
s.
Required Methods§
Sourcefn load_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine,
component: &'life2 AppComponent<'_>,
) -> Pin<Box<dyn Future<Output = Result<Component>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine,
component: &'life2 AppComponent<'_>,
) -> Pin<Box<dyn Future<Output = Result<Component>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Loads a Component
for the given [AppComponent
].
Provided Methods§
Sourcefn load_instance_pre<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine<InstanceState<T::InstanceState, U>>,
component: &'life2 AppComponent<'_>,
) -> Pin<Box<dyn Future<Output = Result<InstancePre<InstanceState<T::InstanceState, U>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load_instance_pre<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine<InstanceState<T::InstanceState, U>>,
component: &'life2 AppComponent<'_>,
) -> Pin<Box<dyn Future<Output = Result<InstancePre<InstanceState<T::InstanceState, U>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Loads [InstancePre
] for the given [AppComponent
].