pub struct BailOut<'a> {
pub reason: Option<&'a str>,
}Expand description
Marks an emergency exit of the test procedure.
Fields§
§reason: Option<&'a str>Optional reason for bailing out of the test procedure.
Implementations§
Source§impl<'a> BailOut<'a>
impl<'a> BailOut<'a>
Sourcepub fn parse_from_str(content: &'a str) -> Result<Self>
pub fn parse_from_str(content: &'a str) -> Result<Self>
Parse BailOut from a &str.
§Examples
Parsing a TAP bail-out may look like this:
use tapconsooomer::BailOut;
let content = "Bail out! Hardware overheating";
let bail_out = BailOut::parse_from_str(content).expect("Parser error");
assert_eq!(bail_out.reason, Some("Hardware overheating"));Note, BailOut::reason is optional:
use tapconsooomer::BailOut;
let content = "Bail out!";
let bail_out = BailOut::parse_from_str(content).expect("Parser error");
assert_eq!(bail_out.reason.is_none(), true);Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BailOut<'a>
impl<'a> RefUnwindSafe for BailOut<'a>
impl<'a> Send for BailOut<'a>
impl<'a> Sync for BailOut<'a>
impl<'a> Unpin for BailOut<'a>
impl<'a> UnwindSafe for BailOut<'a>
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