Struct flowcore::model::flow_definition::FlowDefinition
source · pub struct FlowDefinition {Show 14 fields
pub name: Name,
pub inputs: IOSet,
pub outputs: IOSet,
pub process_refs: Vec<ProcessReference>,
pub connections: Vec<Connection>,
pub metadata: MetaData,
pub docs: String,
pub alias: Name,
pub id: usize,
pub source_url: Url,
pub route: Route,
pub subprocesses: BTreeMap<Name, Process>,
pub lib_references: BTreeSet<Url>,
pub context_references: BTreeSet<Url>,
}
Expand description
FlowDefinition
defines (at compile time) a parent or child flow in the nested flow hierarchy
Fields§
§name: Name
name
given to this flow
inputs: IOSet
inputs
that this flow defines
outputs: IOSet
outputs
that this flow defines
process_refs: Vec<ProcessReference>
Set of sub-processes referenced (used) in this flow
connections: Vec<Connection>
connections
within this flow, from flow input or to flow outputs
metadata: MetaData
metadata
about flow author, versions etc
docs: String
Name of any docs file associated with this Flow
alias: Name
When the same process is used multiple times within a single flow, to disambiguate between them each one must be given an alias that is used to refer to it
id: usize
flows are assigned a numeric id
in the hierarchy
source_url: Url
source_url
is the url of the file/resource where this flow definition was read from
route: Route
route
defines the location in the hierarchy of flows where this flow resides
subprocesses: BTreeMap<Name, Process>
subprocesses
are the loaded definition of the processes reference (used) within this flow
lib_references: BTreeSet<Url>
lib_references
is the set of library references used in this flow
context_references: BTreeSet<Url>
context_references
is the set of context functions used in this flow
Implementations§
source§impl FlowDefinition
impl FlowDefinition
sourcepub fn default_url() -> Url
pub fn default_url() -> Url
Return a default value for a Url as part of a flow
sourcepub fn inputs_mut(&mut self) -> &mut IOSet
pub fn inputs_mut(&mut self) -> &mut IOSet
Get a mutable reference to the set of inputs this flow defines
sourcepub fn config(
&mut self,
source_url: &Url,
parent_route: &Route,
alias_from_reference: &Name,
id: usize,
initializations: &BTreeMap<String, InputInitializer>
) -> Result<()>
pub fn config( &mut self, source_url: &Url, parent_route: &Route, alias_from_reference: &Name, id: usize, initializations: &BTreeMap<String, InputInitializer> ) -> Result<()>
Configure a flow with additional information after it is deserialized from file
sourcepub fn is_runnable(&self) -> bool
pub fn is_runnable(&self) -> bool
Check if the flow can be run (it could be a sub-flow not a context level runnable flow)
sourcepub fn build_connections(&mut self, level: usize) -> Result<()>
pub fn build_connections(&mut self, level: usize) -> Result<()>
Iterate over all the connections defined in the flow, and attempt to connect the source and destination (within the flow), checking the two types are compatible
Trait Implementations§
source§impl Clone for FlowDefinition
impl Clone for FlowDefinition
source§fn clone(&self) -> FlowDefinition
fn clone(&self) -> FlowDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more