pub struct Process {Show 16 fields
number: String,
all_revisions: Vec<(String, String)>,
title: String,
process_type: String,
author: String,
reviewer: String,
subject: String,
subject_image: String,
product: String,
product_image: String,
all_objectives: Vec<(String, String)>,
all_out_of_scopes: Vec<(String, String)>,
all_sections: Vec<Section>,
all_resources: Vec<(Resource, String)>,
all_verifications: Vec<(Requirement, String)>,
all_templates: Vec<String>,
}Expand description
Top-level struct containing all information read from the markup file
All fields are private, but are accessible with “get” functions, e.g. Process.get_number() returns a reference to the Process’s number (&String).
Fields§
§number: StringDocument Number, in whatever format makes sense for the organization’s document control system
all_revisions: Vec<(String, String)>A stack of Revision lines, with an important assumption that the first Revision line represents the current Rev of the document, and the last Revision line represents the first released Rev of the document
- First String: “Rev” text, e.g. “A” for a document’s Revision A
- Second String: “What changed?” text, e.g. “New section added to initialize the system prior to start”
title: StringHuman-readable Title of the process document, hopefully with enough meaning for the team to understand the purpose of the process
process_type: StringHuman-readable category of process document, such as “Test Procedure” or “Work Instruction” or “Maintenance Procedure” etc.
Human that composed the markup file in its current Revision, i.e. who currently owns the knowledge in this process
reviewer: StringHuman responsible for being the second set of eyes for this Revision, and who is the gatekeeper to publishing this Revision prior to its use in the field
subject: StringThe thing that this process applies to, i.e. the primary input into the Process, be it tangible or abstract
subject_image: StringFile name for an image of the Subject
product: StringIf this process changes the Subject into something else, then that something else is the Product
product_image: StringFile name for an image of the Product
all_objectives: Vec<(String, String)>Compiled list of Objective statements found throughout the document when they are achieved
all_out_of_scopes: Vec<(String, String)>Compiled list of Out-of-Scope statements found throughout the document when they are achieved
all_sections: Vec<Section>Ordered set of all Step-filled sections of the document
all_resources: Vec<(Resource, String)>Cummulative list of all Resources identified in all Steps
all_verifications: Vec<(Requirement, String)>Cummulative list of all Verifications of Requirements performed in all Steps
all_templates: Vec<String>File names for custom templates (CSS) to use that augment the vanilla template
- Company-specific
- Project-specific
- Security environment-specific
- etc.
Implementations§
Source§impl Process
Functions necessary to create ::new() structs, as well as “get” every private field publicly, and to change or append private fields publicly
impl Process
Functions necessary to create ::new() structs, as well as “get” every private field publicly, and to change or append private fields publicly
Sourcepub fn new() -> Process
pub fn new() -> Process
Return Process struct with placeholder text in String fields, and empty vectors for Vec fields
Sourcepub fn get_number(&self) -> &String
pub fn get_number(&self) -> &String
Return reference to the Document Number string
Sourcepub fn get_revision(&self) -> &String
pub fn get_revision(&self) -> &String
Return reference to the LATEST Revision (first listed in the markup file)
Sourcepub fn get_all_revisions(&self) -> &Vec<(String, String)>
pub fn get_all_revisions(&self) -> &Vec<(String, String)>
Return reference to the vector of touples describing each Revision and what changed
Sourcepub fn get_process_type(&self) -> &String
pub fn get_process_type(&self) -> &String
Return reference to the Process Type string
Return reference to the Author string
Sourcepub fn get_reviewer(&self) -> &String
pub fn get_reviewer(&self) -> &String
Return reference to the Reviewer string
Sourcepub fn get_subject(&self) -> &String
pub fn get_subject(&self) -> &String
Return reference to the Subject string
Sourcepub fn get_subject_image(&self) -> &String
pub fn get_subject_image(&self) -> &String
Return reference to the file name of an Image of the Subject as string
Sourcepub fn get_product(&self) -> &String
pub fn get_product(&self) -> &String
Return reference to the Product string
Sourcepub fn get_product_image(&self) -> &String
pub fn get_product_image(&self) -> &String
Return reference to the file name of an Image of the Product as string
Sourcepub fn get_all_sections(&self) -> &Vec<Section>
pub fn get_all_sections(&self) -> &Vec<Section>
Return reference to a Vector of Sections, in the order they appear in the markup
Sourcepub fn get_all_verifications(&self) -> &Vec<(Requirement, String)>
pub fn get_all_verifications(&self) -> &Vec<(Requirement, String)>
Return reference to a Vector of Requirement Tuples, each with a Requirement struct and a string containing the Step number
Sourcepub fn get_all_objectives(&self) -> &Vec<(String, String)>
pub fn get_all_objectives(&self) -> &Vec<(String, String)>
Return reference to a Vector of Tuples describing each objective and at what step it is achieved
Sourcepub fn get_all_out_of_scopes(&self) -> &Vec<(String, String)>
pub fn get_all_out_of_scopes(&self) -> &Vec<(String, String)>
Return reference to a Vector of Tuples describing each out-of-scope declaration and at from which step
Sourcepub fn get_all_templates(&self) -> &Vec<String>
pub fn get_all_templates(&self) -> &Vec<String>
Return reference to a Vector of Templates as strings, one for each CSS file needed for the process
Sourcepub fn get_all_resources(&self) -> &Vec<(Resource, String)>
pub fn get_all_resources(&self) -> &Vec<(Resource, String)>
Return reference to a Vector of Resource Tuples, each with a Resource struct and a string containing the Step number
Sourcepub fn get_tpv_count(&self) -> usize
pub fn get_tpv_count(&self) -> usize
Return the total number of Action lines that require Two-Party Verification (TPV)
Sourcepub fn get_non_tpv_count(&self) -> usize
pub fn get_non_tpv_count(&self) -> usize
Return the total number of Action lines that don’t require Two-Party Verification (no TPV)
Sourcepub fn get_all_command_lines(&self) -> Vec<(String, String)>
pub fn get_all_command_lines(&self) -> Vec<(String, String)>
Return a vector of string tuples, with every “Command” line’s text (first element), with the step number (second element) in order of appearance in the process
Sourcepub fn display_process_to_stdout(&self)
pub fn display_process_to_stdout(&self)
Used in verbose mode to display contents of the struct to stdout
Sourcepub fn set_number(&mut self, doc_num: &str)
pub fn set_number(&mut self, doc_num: &str)
Change the Document Number
Sourcepub fn add_revision(&mut self, rev_line: &str)
pub fn add_revision(&mut self, rev_line: &str)
Add a Revision Tuple to the Vector “all_revisions”
Sourcepub fn set_process_type(&mut self, process_type: &str)
pub fn set_process_type(&mut self, process_type: &str)
Change the Process Type
Change the Document Author
Sourcepub fn set_reviewer(&mut self, reviewer: &str)
pub fn set_reviewer(&mut self, reviewer: &str)
Change the Document Reviewer
Sourcepub fn set_subject(&mut self, subject: &str)
pub fn set_subject(&mut self, subject: &str)
Change the Document Subject
Sourcepub fn set_subject_image(&mut self, subject_image: &str)
pub fn set_subject_image(&mut self, subject_image: &str)
Change the Image file name of the Document Subject
Sourcepub fn set_product(&mut self, product: &str)
pub fn set_product(&mut self, product: &str)
Change the Document Product
Sourcepub fn set_product_image(&mut self, product_image: &str)
pub fn set_product_image(&mut self, product_image: &str)
Change the Image file name of the Document Product
Sourcepub fn add_template(&mut self, template: &str)
pub fn add_template(&mut self, template: &str)
Add a Template file to the Vector of Template files (strings)
Sourcepub fn add_section(&mut self, section: Section)
pub fn add_section(&mut self, section: Section)
Add a Section to the Vector of Section structs
Sourcepub fn add_verification(&mut self, requirement: Requirement, step: String)
pub fn add_verification(&mut self, requirement: Requirement, step: String)
Add a Verification tuple to the Vector of Verification tuples
Sourcepub fn add_objective(&mut self, objective: String, step: String)
pub fn add_objective(&mut self, objective: String, step: String)
Add an Objective tuple to the Vector of Objective tuples
Sourcepub fn add_out_of_scope(&mut self, out_of_scope: String, step: String)
pub fn add_out_of_scope(&mut self, out_of_scope: String, step: String)
Add an Out-of-Scope tuple to the Vector of Out-of-Scope tuples
Sourcepub fn add_resource(&mut self, resource: Resource, step: String)
pub fn add_resource(&mut self, resource: Resource, step: String)
Add a Resource struct to the Vector of Resource structs