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

source

pub fn default_url() -> Url

Return a default value for a Url as part of a flow

source

pub fn set_alias(&mut self, alias: &Name)

Set the alias of this flow to the supplied Name

source

pub fn get_docs(&self) -> &str

Get the name of any associated docs file

source

pub fn inputs(&self) -> &IOSet

Get a reference to the set of inputs this flow defines

source

pub fn inputs_mut(&mut self) -> &mut IOSet

Get a mutable reference to the set of inputs this flow defines

source

pub fn outputs(&self) -> &IOSet

Get a reference to the set of outputs this flow defines

source

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

source

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)

source

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

source§

fn clone(&self) -> FlowDefinition

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FlowDefinition

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FlowDefinition

source§

fn default() -> FlowDefinition

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FlowDefinition

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for FlowDefinition

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&FlowDefinition> for MetaData

source§

fn from(flow: &FlowDefinition) -> Self

Converts to this type from the input type.
source§

impl HasName for FlowDefinition

source§

fn name(&self) -> &Name

Return a reference to the name of the struct implementing this trait
source§

fn alias(&self) -> &Name

Return a reference to the alias (also a Name type) of the struct implementing this trait
source§

impl HasRoute for FlowDefinition

source§

fn route(&self) -> &Route

Return a reference to the Route of the struct that implements this trait
source§

fn route_mut(&mut self) -> &mut Route

Return a mutable reference to the Route of the struct that implements this trait
source§

impl Serialize for FlowDefinition

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl SetRoute for FlowDefinition

source§

fn set_routes_from_parent(&mut self, parent_route: &Route)

Set the routes in fields of this struct based on the route of it’s parent.
source§

impl Validate for FlowDefinition

source§

fn validate(&self) -> Result<()>

Validate that a deserialized model data structure is valid for use

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,