diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-01-08 09:20:04 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-01-08 11:41:21 +0200 |
commit | 432a88a05bec355aff948cdbfef0bacd9c57db8e (patch) | |
tree | e51cdacf6bb1b0d8bbd4d20807c706e4b3534a4c /src/steps.rs | |
parent | fbcc54cde9a2c77dc2cfd00ce95c4d2a2eebc243 (diff) | |
download | subplot-432a88a05bec355aff948cdbfef0bacd9c57db8e.tar.gz |
Change: use tera templates for generating Python code
Diffstat (limited to 'src/steps.rs')
-rw-r--r-- | src/steps.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/steps.rs b/src/steps.rs index 7df6dda..66ab453 100644 --- a/src/steps.rs +++ b/src/steps.rs @@ -1,4 +1,5 @@ use crate::{Error, Result}; +use serde::{Deserialize, Serialize}; use std::fmt; /// A scenario step. @@ -10,7 +11,7 @@ use std::fmt; /// This is just the step as it appears in the scenario in the input /// text. It has not been matched with a binding. See MatchedStep for /// that. -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] pub struct ScenarioStep { kind: StepKind, text: String, @@ -69,7 +70,7 @@ impl fmt::Display for ScenarioStep { /// This needs to be extended if the Subplot language gets extended with other /// kinds of steps. However, note that the scenario parser will hide aliases, /// such as "and" to mean the same kind as the previous step. -#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize)] pub enum StepKind { /// A "given some precondition" step. Given, |