pub struct PostCondition {
pub closure: ExprClosure,
pub cfg: Option<Meta>,
}Expand description
A postcondition represented by a closure that takes the return value as a reference.
Fields§
§closure: ExprClosureThe closure that validates the postcondition, taking the function’s
return value by reference, e.g. |output| *output > 0.
cfg: Option<Meta>Static analyzers can safely ignore this field.
Build configuration filter to decide whether to add runtime checks.
Passed to a cfg!() guard in the instrumented function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PostCondition
impl RefUnwindSafe for PostCondition
impl !Send for PostCondition
impl !Sync for PostCondition
impl Unpin for PostCondition
impl UnwindSafe for PostCondition
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