Skip to main content

extern_spec_T_Option_T_is_some_and

Function extern_spec_T_Option_T_is_some_and 

Source
pub fn extern_spec_T_Option_T_is_some_and<T>(
    self_: Option<T>,
    f: impl FnOnce(T) -> bool + Destruct,
) -> bool
Expand description

extern spec for Option<T>::is_some_and

This is not a real function: its only use is for documentation.

requires

match self { None => true, Some(t) => f.precondition((t,)) }

ensures

match self {
    None => result == false,
    Some(t) => f.postcondition_once((t,), result),
}