pub struct SoftScope<'a> { /* private fields */ }Expand description
A context sub-scope of a SoftAsserter, returned by
SoftAsserter::context.
Recording through a SoftScope behaves exactly like recording through the
underlying SoftAsserter, except every recorded failure also carries the
scope’s context frame (and the frames of any enclosing scopes). Dropping the
SoftScope removes its frame, so the context applies only to failures
recorded while the scope is alive.
Implementations§
Source§impl SoftScope<'_>
impl SoftScope<'_>
Sourcepub fn check<T, M>(&mut self, actual: &T, matcher: M)
pub fn check<T, M>(&mut self, actual: &T, matcher: M)
Records whether actual satisfies matcher, attaching this scope’s
context to a miss. See SoftAsserter::check.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SoftScope<'a>
impl<'a> !RefUnwindSafe for SoftScope<'a>
impl<'a> Send for SoftScope<'a>
impl<'a> Sync for SoftScope<'a>
impl<'a> Unpin for SoftScope<'a>
impl<'a> UnsafeUnpin for SoftScope<'a>
impl<'a> !UnwindSafe for SoftScope<'a>
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