pub struct ExecutionGraph {
pub stages: Vec<StageNode>,
pub variables: Vec<Variable>,
/* private fields */
}Expand description
Execution graph representing the DAG of stages and jobs
Fields§
§stages: Vec<StageNode>All stages in the pipeline
variables: Vec<Variable>Pipeline-level variables
Implementations§
Source§impl ExecutionGraph
impl ExecutionGraph
Sourcepub fn from_pipeline(pipeline: &Pipeline) -> Result<Self, GraphError>
pub fn from_pipeline(pipeline: &Pipeline) -> Result<Self, GraphError>
Build an execution graph from a pipeline definition
Sourcepub fn validate(&self) -> Result<(), GraphError>
pub fn validate(&self) -> Result<(), GraphError>
Validate the execution graph (check for cycles and unknown dependencies)
Sourcepub fn topological_order(&self) -> Vec<&StageNode>
pub fn topological_order(&self) -> Vec<&StageNode>
Get stages in topological order (respecting dependencies)
Sourcepub fn jobs_topological_order<'a>(
&self,
stage: &'a StageNode,
) -> Vec<&'a JobNode>
pub fn jobs_topological_order<'a>( &self, stage: &'a StageNode, ) -> Vec<&'a JobNode>
Get jobs in topological order for a stage
Sourcepub fn parallel_stages(&self) -> Vec<Vec<&StageNode>>
pub fn parallel_stages(&self) -> Vec<Vec<&StageNode>>
Get stages that can run in parallel (no dependencies between them)
Trait Implementations§
Source§impl Clone for ExecutionGraph
impl Clone for ExecutionGraph
Source§fn clone(&self) -> ExecutionGraph
fn clone(&self) -> ExecutionGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExecutionGraph
impl RefUnwindSafe for ExecutionGraph
impl Send for ExecutionGraph
impl Sync for ExecutionGraph
impl Unpin for ExecutionGraph
impl UnsafeUnpin for ExecutionGraph
impl UnwindSafe for ExecutionGraph
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more