pub enum Section {
TestResult(Test),
}Expand description
A section within a report.
Variants§
Implementations§
Source§impl Section
impl Section
Sourcepub fn as_test_result(&self) -> Option<&Test>
pub fn as_test_result(&self) -> Option<&Test>
Returns a refernece to a [Some(TestResult)] if the Section is of
type Section::TestResult. Else, returns None.
§Examples
use bitbelay_report::section::test::module::Result;
use bitbelay_report::section::test::Builder;
use bitbelay_report::section::test::Module;
use bitbelay_report::Section;
let result = Builder::default()
.title("Foo")?
.description("Bar")?
.push_module(Module::new(Result::Inconclusive, "Baz", None, None))
.try_build()?;
let section = Section::TestResult(result);
assert!(matches!(section.as_test_result(), Some(_)));
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
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