pub struct Roadmap { /* private fields */ }
Expand description
Represent a full project roadmap.
This stores all the steps needed to reach the end goal. See the crate leve documentation for an example.
Implementations§
source§impl Roadmap
impl Roadmap
sourcepub fn new(map: HashMap<String, Step>) -> Self
pub fn new(map: HashMap<String, Step>) -> Self
Create a new, empty roadmap.
You probably want the from_yaml
function instead.
sourcepub fn count_goals(&self) -> usize
pub fn count_goals(&self) -> usize
Count number of steps that nothing depends on.
sourcepub fn step_names(&self) -> impl Iterator<Item = &str>
pub fn step_names(&self) -> impl Iterator<Item = &str>
Iterate over step names.
pub fn iter(&self) -> impl Iterator<Item = &Step>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Step>
sourcepub fn set_missing_statuses(&mut self)
pub fn set_missing_statuses(&mut self)
Compute status of any step for which it has not been specified in the input.
sourcepub fn is_ready(&self, step: &Step) -> bool
pub fn is_ready(&self, step: &Step) -> bool
Should unset status be ready? In other words, if there are any dependencies, they are all finished.
sourcepub fn is_blocked(&self, step: &Step) -> bool
pub fn is_blocked(&self, step: &Step) -> bool
Should unset status be blocked? In other words, if there are any dependencies, that aren’t finished.
sourcepub fn is_goal(&self, step: &Step) -> bool
pub fn is_goal(&self, step: &Step) -> bool
Should status be goal? In other words, does any other step depend on this one?
pub fn validate(&self) -> RoadmapResult<()>
sourcepub fn format_as_dot(&self, label_width: usize) -> RoadmapResult<String>
pub fn format_as_dot(&self, label_width: usize) -> RoadmapResult<String>
Get a Graphviz dot language representation of a roadmap. This is the textual representation, and the caller needs to use the Graphviz dot(1) tool to create an image from it.