Struct Requirement

Source
pub struct Requirement {
    id: String,
    text: String,
    method: VerificationMethod,
}
Expand description

Each Requirement struct represents a formal “shall” statement whose evidence of verification is produced in a Step of a Process

Fields§

§id: String

Unique ID for the requirement

§text: String

Full text of the requirement, which includes the word “shall.”

Example of good requirement wording:

(When [SUB/SYSTEM or VARIABLE] is [MODE/STATE or VALUE or RANGE],) [AGENT] shall [BEHAVE] (within [TOLERANCE]). (Note: [CLARIFYING NOTES OR REFERENCES])

§method: VerificationMethod

Method of verification–how is this requirement to be verified? This is important for processes, because steps to produce evidence of verification should be steps that somehow resemble this verificaiton method.

Implementations§

Source§

impl Requirement

Since Requirement structs are created directly in a function outside the struct at read-time, we just need “get” functions

Source

pub fn get_id(&self) -> &String

Return reference to the Requirement ID string

Source

pub fn get_text(&self) -> &String

Return reference to the Requirement Text string

Source

pub fn get_method(&self) -> String

Return reference to the Verification Method as a string, even though that’s not how’s it’s stored

Auto Trait Implementations§

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.