[][src]Struct egress::Egress

pub struct Egress { /* fields omitted */ }

A testing context. You can open as many as you want, but make sure their artifact_subdirs don't collide.

Methods

impl Egress[src]

pub fn open<P, Q>(config_dir: P, artifact_subdir: Q) -> Result<Self, ErrorKind> where
    P: AsRef<Path>,
    Q: AsRef<Path>, 
[src]

Open a new Egress context, given the path to a directory containing an Egress.toml config file and a subpath for where this Egress context should place its artifacts relative to the configured artifact_subdir.

If an Egress.toml file is not found, one will be initialized with the default values at the directory indicated by config_dir.

pub fn artifact<P: AsRef<Path>>(&mut self, name: P) -> &mut Artifact[src]

Construct a new Artifact reference. Any data inserted into the artifact returned will be written into a directory inside the artifact_dir configured in Egress.toml.

pub fn close(self) -> Result<Report, ErrorKind>[src]

Close the testing context and write new artifacts to disk before reporting any artifacts which don't match the reference values stored in the egress/artifacts folder.

pub fn close_and_assert_unregressed(self) -> Result<(), ErrorKind>[src]

Shorthand for .close()?.assert_unregressed()?.

Trait Implementations

impl Debug for Egress[src]

Auto Trait Implementations

impl RefUnwindSafe for Egress

impl Send for Egress

impl Sync for Egress

impl Unpin for Egress

impl UnwindSafe for Egress

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.