Struct ShellReporter

Source
pub struct ShellReporter<W: 'static + Write + Send + Sync> { /* private fields */ }
Expand description

A reporter that outputs results and artifacts to a single stream, usually stdout. This reporter is intended to provide “live” updates to a developer watching while tests are executed.

Implementations§

Source§

impl ShellReporter<Vec<u8>>

Source§

impl<W: 'static + Write + Send + Sync> ShellReporter<W>

Source

pub fn new(inner: W) -> Self

Trait Implementations§

Source§

impl<W: 'static + Write + Send + Sync> Reporter for ShellReporter<W>

Source§

fn new_entity(&self, entity: &EntityId, name: &str) -> Result<(), Error>

Record a new test suite or test case. This should be called once per entity.
Source§

fn set_entity_info(&self, entity: &EntityId, info: &EntityInfo)

Add additional info for an entity.
Source§

fn entity_started(&self, entity: &EntityId, _: Timestamp) -> Result<(), Error>

Record that a test run, suite or case has started.
Source§

fn entity_stopped( &self, entity: &EntityId, outcome: &ReportedOutcome, _: Timestamp, ) -> Result<(), Error>

Record that a test run, suite, or case has stopped.
Source§

fn entity_finished(&self, entity: &EntityId) -> Result<(), Error>

Record that a test run, suite, or case has stopped. After this method is called for an entity, no additional events or artifacts may be added to the entity. Implementations of Reporter may assume that entity_finished will be called no more than once for any entity.
Source§

fn new_artifact( &self, entity: &EntityId, artifact_type: &ArtifactType, ) -> Result<Box<dyn Write + Send + Sync + 'static>, Error>

Create a new artifact scoped to the referenced entity.
Source§

fn new_directory_artifact( &self, _entity: &EntityId, _artifact_type: &DirectoryArtifactType, _component_moniker: Option<String>, ) -> Result<Box<dyn DirectoryWrite + Send + Sync + 'static>, Error>

Create a new artifact consisting of multiple files.

Auto Trait Implementations§

§

impl<W> !Freeze for ShellReporter<W>

§

impl<W> !RefUnwindSafe for ShellReporter<W>

§

impl<W> Send for ShellReporter<W>

§

impl<W> Sync for ShellReporter<W>

§

impl<W> Unpin for ShellReporter<W>

§

impl<W> !UnwindSafe for ShellReporter<W>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoAny for T
where T: 'static + Send + Sync,

Source§

fn into_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Cast the given object into a dyn std::any::Any.
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V