pub struct ScenarioStep { /* private fields */ }
Expand description
A scenario step.
The scenario parser creates these kinds of data structures to represent the parsed scenario step. The step consists of a kind (expressed as a StepKind), and the text of the step.
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.
Implementations§
Source§impl ScenarioStep
impl ScenarioStep
Sourcepub fn new(
kind: StepKind,
keyword: &str,
text: &str,
origin: Location,
) -> ScenarioStep
pub fn new( kind: StepKind, keyword: &str, text: &str, origin: Location, ) -> ScenarioStep
Construct a new step.
Sourcepub fn new_from_str(
text: &str,
default: Option<StepKind>,
origin: Location,
) -> Result<ScenarioStep, SubplotError>
pub fn new_from_str( text: &str, default: Option<StepKind>, origin: Location, ) -> Result<ScenarioStep, SubplotError>
Construct a step from a line in a scenario.
If the step uses the “and” or “but” keyword, use the default step kind instead.
Trait Implementations§
Source§impl Clone for ScenarioStep
impl Clone for ScenarioStep
Source§fn clone(&self) -> ScenarioStep
fn clone(&self) -> ScenarioStep
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 moreSource§impl Debug for ScenarioStep
impl Debug for ScenarioStep
Source§impl<'de> Deserialize<'de> for ScenarioStep
impl<'de> Deserialize<'de> for ScenarioStep
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
Source§impl Display for ScenarioStep
impl Display for ScenarioStep
Source§impl PartialEq for ScenarioStep
impl PartialEq for ScenarioStep
Source§impl Serialize for ScenarioStep
impl Serialize for ScenarioStep
impl Eq for ScenarioStep
impl StructuralPartialEq for ScenarioStep
Auto Trait Implementations§
impl Freeze for ScenarioStep
impl RefUnwindSafe for ScenarioStep
impl Send for ScenarioStep
impl Sync for ScenarioStep
impl Unpin for ScenarioStep
impl UnwindSafe for ScenarioStep
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