contract_check_ensures in std::intrinsics - Rust
Description: Check if the post-condition `cond` has been met.

## contract_check_ensures

# Function contract_check_ensures

Source

    pub const fn contract_check_ensures<C, Ret>(cond: Option<C>, ret: Ret) -> Retwhere
        C: Fn(&Ret) -> bool + Copy,

🔬This is a nightly-only experimental API. (`contracts_internals` #128044)
Expand description

Check if the post-condition `cond` has been met.

By default, if `contract_checks` is enabled, this will panic with no unwind if the condition returns false.

If `cond` is `None`, then no postcondition checking is performed.

Note that this function is a no-op during constant evaluation.