pub struct Workflow {
pub id: String,
pub table: Arc<SymTable>,
pub metadata: Arc<HashSet<Metadata>>,
pub user: Arc<Option<String>>,
pub graph: Arc<Vec<Edge>>,
pub funcs: Arc<HashMap<usize, Vec<Edge>>>,
}
Expand description
Defines a Workflow, which is meant to be an ‘executable but reasonable’ graph.
Fields§
§id: String
Some ID of this workflow.
table: Arc<SymTable>
The global symbol / definition table. This specific table is also affectionally referred to as the “Workflow table”.
metadata: Arc<HashSet<Metadata>>
Toplevel metadata
user: Arc<Option<String>>
Whomst’ve ever submitted the workflow (as a string identifier).
graph: Arc<Vec<Edge>>
Implements the graph. Note that the ordering of this graph is important, but it will not be executed linearly.
funcs: Arc<HashMap<usize, Vec<Edge>>>
Contains the parts of the graph that are callable.
Implementations§
source§impl Workflow
impl Workflow
sourcepub fn new(
id: String,
table: SymTable,
graph: Vec<Edge>,
funcs: HashMap<usize, Vec<Edge>>,
) -> Self
pub fn new( id: String, table: SymTable, graph: Vec<Edge>, funcs: HashMap<usize, Vec<Edge>>, ) -> Self
Constructor for the Workflow that initializes it to the given contents.
§Arguments
id
: Some identifier for this workflow.table
: The DefTable that contains the definitions in this workflow.graph
: The main edges that compose this Workflow.funcs
: Auxillary edges that provide a kind of function-like paradigm to the edges.
§Returns
A new Workflow instance.
sourcepub fn with_random_id(
table: SymTable,
graph: Vec<Edge>,
funcs: HashMap<usize, Vec<Edge>>,
) -> Self
pub fn with_random_id( table: SymTable, graph: Vec<Edge>, funcs: HashMap<usize, Vec<Edge>>, ) -> Self
Constructor for the Workflow that initializes it to the given contents, but generates a random ID.
§Arguments
table
: The DefTable that contains the definitions in this workflow.graph
: The main edges that compose this Workflow.funcs
: Auxillary edges that provide a kind of function-like paradigm to the edges.
§Returns
A new Workflow instance with a random ID.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Workflow
impl<'de> Deserialize<'de> for Workflow
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Workflow
impl RefUnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnwindSafe for Workflow
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request