[−][src]Struct kevlar::TestEvent
A TestEvent is any event that you want to highlight during the test. Typically this will be a test failure but you might also want to capture other events also.
Methods
impl TestEvent
[src]
pub fn new(status: TestStatus) -> Self
[src]
Create a new TestEvent.
pub fn with_description(self, description: &str) -> Self
[src]
Supply a description to the TestEvent. Supports chaining.
Example:
TestEvent::new(TestStatus::Failed).with_description("Something went wrong")
pub fn with_artifact(self, artifact: TestArtifact) -> Self
[src]
Supply an artifact to the TestEvent. Supports chaining. You can add multiple artifacts by chaining this several times.
Example:
let event = TestEvent::new(TestStatus::Failed) .with_description("Something went wrong") .with_artifact(artifact1) .with_artifact(artifact2);
pub fn set_description(&mut self, description: &str)
[src]
Set the description of this event. This will override any existing description if one was already specified.
pub fn add_artifact(&mut self, artifact: TestArtifact)
[src]
Add an artifact to this event.
Trait Implementations
Auto Trait Implementations
impl Send for TestEvent
impl Sync for TestEvent
impl Unpin for TestEvent
impl UnwindSafe for TestEvent
impl RefUnwindSafe for TestEvent
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,