[][src]Struct flowrlib::loader::Loader

pub struct Loader { /* fields omitted */ }

A Loader is responsible for loading a Flow from it's Manifest, loading the required libraries needed by the flow and keeping track of the Function Implementations that will be used to execute it.

Implementations

impl Loader[src]

pub fn new() -> Self[src]

Create a new Loader

pub fn get_lib_implementations(
    &self
) -> &HashMap<String, Arc<dyn Implementation>>
[src]

pub fn load_manifest(
    &mut self,
    provider: &dyn Provider,
    flow_manifest_url: &str
) -> Result<Manifest>
[src]

Load all the processes defined in a manifest, and then find all the implementations required for function execution later.

A flow is dynamically loaded, so none of the implementations it brings can be static, they must all be dynamically loaded from WASM. Each one will be wrapped in a Native "WasmExecutor" implementation to make it present the same interface as a native implementation.

The run-time that (statically) links this library may provide some native implementations already, before this is called.

It may have processes that use Implementations in libraries. Those must have been loaded previously. They maybe Native or Wasm implementations, but the Wasm ones will have been wrapped in a Native "WasmExecutor" implementation to make it appear native. Thus, all library implementations found will be Native.

pub fn resolve_implementations(
    &mut self,
    flow_manifest: &mut Manifest,
    manifest_url: &str,
    provider: &dyn Provider
) -> Result<String>
[src]

Resolve or "find" all the implementations of functions for a flow The root_url is the url of the manifest or the directory where the manifest is located and is used in resolving relative references to other files.

pub fn add_lib(
    &mut self,
    provider: &dyn Provider,
    lib_reference: &str,
    lib_manifest: LibraryManifest,
    lib_manifest_url: &str
) -> Result<()>
[src]

Add a library to the run-time by adding it's ImplementationLocators from the manifest to the table for this run-time, so that then when we try to load a flow that references functions in the library, they can be found.

Trait Implementations

impl Default for Loader[src]

Auto Trait Implementations

impl RefUnwindSafe for Loader

impl Send for Loader

impl Sync for Loader

impl Unpin for Loader

impl UnwindSafe for Loader

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.