Struct subplot::ScenarioStep
source · [−]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
sourceimpl ScenarioStep
impl ScenarioStep
sourcepub fn new_from_str(
text: &str,
default: Option<StepKind>
) -> Result<ScenarioStep, SubplotError>
pub fn new_from_str(
text: &str,
default: Option<StepKind>
) -> 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
sourceimpl Clone for ScenarioStep
impl Clone for ScenarioStep
sourcefn clone(&self) -> ScenarioStep
fn clone(&self) -> ScenarioStep
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ScenarioStep
impl Debug for ScenarioStep
sourceimpl<'de> Deserialize<'de> for ScenarioStep
impl<'de> Deserialize<'de> for ScenarioStep
sourcefn 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
sourceimpl Display for ScenarioStep
impl Display for ScenarioStep
sourceimpl PartialEq<ScenarioStep> for ScenarioStep
impl PartialEq<ScenarioStep> for ScenarioStep
sourcefn eq(&self, other: &ScenarioStep) -> bool
fn eq(&self, other: &ScenarioStep) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ScenarioStep) -> bool
fn ne(&self, other: &ScenarioStep) -> bool
This method tests for !=
.
sourceimpl Serialize for ScenarioStep
impl Serialize for ScenarioStep
impl Eq for ScenarioStep
impl StructuralEq for ScenarioStep
impl StructuralPartialEq for ScenarioStep
Auto Trait Implementations
impl RefUnwindSafe for ScenarioStep
impl Send for ScenarioStep
impl Sync for ScenarioStep
impl Unpin for ScenarioStep
impl UnwindSafe for ScenarioStep
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.