[−][src]Struct egress::Egress
A testing context. You can open as many as you want, but make sure their artifact_subdir
s 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]
P: AsRef<Path>,
Q: AsRef<Path>,
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
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]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,