Trait spin_app::Loader

source ·
pub trait Loader {
    fn load_app<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<LockedApp>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn load_module<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        engine: &'life1 Engine,
        source: &'life2 LockedComponentSource
    ) -> Pin<Box<dyn Future<Output = Result<Module>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; fn mount_files<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        store_builder: &'life1 mut StoreBuilder,
        component: &'life2 AppComponent<'_>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; }
Expand description

A trait for implementing the low-level operations needed to load an App.

Required Methods§

Called with an implementation-defined uri pointing to some representation of a LockedApp, which will be loaded.

Called with a LockedComponentSource pointing to a Wasm module binary, which will be loaded.

Called with an AppComponent; any files configured with the component should be “mounted” into the store_builder, via e.g. StoreBuilder::read_only_preopened_dir.

Implementors§