pub struct BoxStatefulTester { /* private fields */ }Expand description
A single-ownership stateful tester backed by Box<dyn FnMut() -> bool>.
BoxStatefulTester is the owned wrapper for zero-argument tests that need
native FnMut() -> bool semantics. Calling StatefulTester::test may
mutate state captured by the wrapped closure.
Implementations§
Source§impl BoxStatefulTester
impl BoxStatefulTester
Sourcepub fn and<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
pub fn and<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
Combines this tester with another stateful tester using logical AND.
The second tester is evaluated only when the first tester returns
true.
Sourcepub fn or<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
pub fn or<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
Combines this tester with another stateful tester using logical OR.
The second tester is evaluated only when the first tester returns
false.
Sourcepub fn nand<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
pub fn nand<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
Combines this tester with another stateful tester using logical NAND.
Sourcepub fn xor<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
pub fn xor<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
Combines this tester with another stateful tester using logical XOR.
Sourcepub fn nor<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
pub fn nor<T>(self, next: T) -> BoxStatefulTesterwhere
T: StatefulTester + 'static,
Combines this tester with another stateful tester using logical NOR.
Trait Implementations§
Source§impl Not for BoxStatefulTester
impl Not for BoxStatefulTester
Source§impl StatefulTester for BoxStatefulTester
impl StatefulTester for BoxStatefulTester
Source§fn into_box(self) -> BoxStatefulTester
fn into_box(self) -> BoxStatefulTester
Converts this tester to
BoxStatefulTester.Source§fn into_rc(self) -> RcStatefulTester
fn into_rc(self) -> RcStatefulTester
Converts this tester to
RcStatefulTester.Source§fn into_arc(self) -> ArcStatefulTester
fn into_arc(self) -> ArcStatefulTester
Converts this tester to
ArcStatefulTester.Auto Trait Implementations§
impl Freeze for BoxStatefulTester
impl !RefUnwindSafe for BoxStatefulTester
impl !Send for BoxStatefulTester
impl !Sync for BoxStatefulTester
impl Unpin for BoxStatefulTester
impl UnsafeUnpin for BoxStatefulTester
impl !UnwindSafe for BoxStatefulTester
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