pub struct Suite { /* private fields */ }Expand description
A temporary directory for one test file.
Implementations§
Source§impl Suite
impl Suite
Sourcepub fn new(name: &str) -> Self
pub fn new(name: &str) -> Self
A fresh directory whose name starts with name.
§Panics
When the system temporary directory cannot hold a new directory.
Sourcepub fn scenario(&self, name: &str) -> Root<'_>
pub fn scenario(&self, name: &str) -> Root<'_>
A fresh directory for one scenario, inside this suite’s, removed when
the returned Root drops. The scenario borrows the suite, because
dropping the suite first would delete a directory still in use:
ⓘ
let suite = ctl_core::fixture::Suite::new("early");
let root = suite.scenario("orphan");
drop(suite);
root.file("a.md", "a");§Panics
When the suite’s directory cannot hold a new directory.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Suite
impl RefUnwindSafe for Suite
impl Send for Suite
impl Sync for Suite
impl Unpin for Suite
impl UnsafeUnpin for Suite
impl UnwindSafe for Suite
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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