pub trait ContainsSpec<Idx, U>{
// Required methods
spec fn obeys_contains() -> bool;
spec fn contains_spec(&self, i: &U) -> bool;
}Required Methods§
Sourcespec fn obeys_contains() -> bool
spec fn obeys_contains() -> bool
Sourcespec fn contains_spec(&self, i: &U) -> bool
spec fn contains_spec(&self, i: &U) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<Idx, U> ContainsSpec<Idx, U> for Range<Idx>
impl<Idx, U> ContainsSpec<Idx, U> for Range<Idx>
Source§open spec fn obeys_contains() -> bool
open spec fn obeys_contains() -> bool
{ (U::obeys_partial_cmp_spec() && <Idx as PartialOrdSpec<U>>::obeys_partial_cmp_spec()) }Source§open spec fn contains_spec(&self, i: &U) -> bool
open spec fn contains_spec(&self, i: &U) -> bool
{ self.start.is_le(&i) && i.is_lt(&self.end) }Source§impl<Idx, U> ContainsSpec<Idx, U> for RangeInclusive<Idx>
impl<Idx, U> ContainsSpec<Idx, U> for RangeInclusive<Idx>
Source§open spec fn obeys_contains() -> bool
open spec fn obeys_contains() -> bool
{ (U::obeys_partial_cmp_spec() && <Idx as PartialOrdSpec<U>>::obeys_partial_cmp_spec()) }Source§open spec fn contains_spec(&self, i: &U) -> bool
open spec fn contains_spec(&self, i: &U) -> bool
{
self@.start.is_le(&i)
&& if self@.exhausted { i.is_lt(&self@.end) } else { i.is_le(&self@.end) }
}