Struct Step

Source
pub struct Step {
    text: String,
    resources: Vec<Resource>,
    all_sub_steps: Vec<SubStep>,
}
Expand description

Each Step struct contains all Actions, Images, Commands, Resources, Verifications, and Warnings contained in that step

Fields§

§text: String

Text of the step, analogous to the Title of a Section except at the Step-level

§resources: Vec<Resource>

Ordered set of Resources identified in the Step, wherever they are mentioned

§all_sub_steps: Vec<SubStep>

Ordered set of SubSteps identified, be them sets of Action lines, Commands, Warnings, or Verification events

Note: Resources are not included as SubSteps themselves, although other lines within a Step are

Implementations§

Source§

impl Step

Step needs “get” and “set/add” functions as well, to read and write private fields

Source

pub fn new() -> Step

Empty string for the Step text, and empty vectors for ‘resources’ and ‘all_sub_steps’

Source

pub fn get_text(&self) -> &String

Return reference to Step text as string

Source

pub fn get_resources(&self) -> &Vec<Resource>

Return reference to Vector of Resource structs for this step

Source

pub fn get_all_sub_steps(&self) -> &Vec<SubStep>

Return reference to Vector of SubStep structs for all SubSteps in this Step

Source

fn set_text(&mut self, text: &str)

Change the text of this Step

Source

fn add_sub_step(&mut self, sub_step: SubStep)

Add a complete SubStep to the ordered Vector of SubStep structs

Source

fn add_resource(&mut self, r: Resource)

Add a complete Resource struct to the ordered Vector of Resource structs

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnwindSafe for Step

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.