pub enum FixtureScope {
Once,
MatrixUnique,
Test,
Global,
}
Expand description
Represents the scope of a fixture.
The scope determines the test’s “lifetime” of the fixture.
Variants§
Once
Fixture is used only once.
The fixture is (re)created everytime we request it.
MatrixUnique
Fixture is unique in a Fixture/Test matrix.
Test
Fixture is associated to a test.
The fixture is (re)created for every tests but created only once per test. This is usefull if the test (or its fixtures’ dependencies) reuse the same fixture twice.
Global
Fixture is global for each test
The fixture is created only once and teardown at end of the tests run.
Trait Implementations§
Source§impl Clone for FixtureScope
impl Clone for FixtureScope
Source§fn clone(&self) -> FixtureScope
fn clone(&self) -> FixtureScope
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for FixtureScope
Auto Trait Implementations§
impl Freeze for FixtureScope
impl RefUnwindSafe for FixtureScope
impl Send for FixtureScope
impl Sync for FixtureScope
impl Unpin for FixtureScope
impl UnwindSafe for FixtureScope
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