pub struct Module { /* private fields */ }Expand description
A module within a Test.
Implementations§
Source§impl Module
impl Module
Sourcepub fn new(
result: Result,
name: impl Into<String>,
value: Option<String>,
details: Option<String>,
) -> Self
pub fn new( result: Result, name: impl Into<String>, value: Option<String>, details: Option<String>, ) -> Self
Creates a new Module.
§Examples
use bitbelay_report::section::test::module::Result;
use bitbelay_report::section::test::Module;
let module = Module::new(Result::Inconclusive, "Baz", None, None);
assert_eq!(module.result(), &Result::Inconclusive);
assert_eq!(module.name(), "Baz");
assert_eq!(module.value(), None);
assert_eq!(module.details(), None);Sourcepub fn details(&self) -> Option<&str>
pub fn details(&self) -> Option<&str>
Gets the details from a Module (if they exist).
§Examples
use bitbelay_report::section::test::module::Result;
use bitbelay_report::section::test::Module;
let module = Module::new(Result::Inconclusive, "Baz", None, None);
assert_eq!(module.details(), None);
let module = Module::new(
Result::Inconclusive,
"Baz",
None,
Some(String::from("Foo and bar")),
);
assert_eq!(module.details(), Some("Foo and bar"));Trait Implementations§
impl Eq for Module
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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