pub struct PostCondition {
pub pat: Option<Pat>,
pub expr: Expr,
pub cfg: Option<Meta>,
}Expand description
A postcondition represented by a pattern to bind the output and a bool-valued expression.
Fields§
§pat: Option<Pat>The pattern to bind/destructure the function’s output, e.g. ref answer.
expr: ExprThe expression that validates the postcondition, e.g. answer == "forty-two".
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 !Send for PostCondition
impl !Sync for PostCondition
impl Freeze for PostCondition
impl RefUnwindSafe for PostCondition
impl Unpin for PostCondition
impl UnsafeUnpin 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