summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-09-19 07:46:27 +0300
committerLars Wirzenius <liw@liw.fi>2019-09-19 07:46:27 +0300
commitd2d0d599c33c170eed17fbcfa23b0303dcf2a648 (patch)
tree3a3ee000c9cf7683e6d84e7793d87b7a33b1844a /src
parent04bb757f41b7d468d783f6bb062e576dad54b60e (diff)
downloadroadmap-d2d0d599c33c170eed17fbcfa23b0303dcf2a648.tar.gz
Add: add_step to Roadmap
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 625bb90..10ab1fa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -85,6 +85,13 @@ impl Roadmap {
None
}
+ /// Add a step to the roadmap. This may fail, if there's a step
+ /// with that name already.
+ pub fn add_step(mut self, step: Step) -> Result<(), Box<dyn std::error::Error>> {
+ self.steps.push(step);
+ Ok(())
+ }
+
/// 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.