[−][src]Struct flowrlib::loader::Loader
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]
&self
) -> &HashMap<String, Arc<dyn Implementation>>
pub fn load_manifest(
&mut self,
provider: &dyn Provider,
flow_manifest_url: &str
) -> Result<Manifest>
[src]
&mut self,
provider: &dyn Provider,
flow_manifest_url: &str
) -> Result<Manifest>
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]
&mut self,
flow_manifest: &mut Manifest,
manifest_url: &str,
provider: &dyn Provider
) -> Result<String>
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]
&mut self,
provider: &dyn Provider,
lib_reference: &str,
lib_manifest: LibraryManifest,
lib_manifest_url: &str
) -> Result<()>
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,