pub struct RangeGhostIterator<A> {
pub start: A,
pub cur: A,
pub end: A,
}Fields§
§start: A§cur: A§end: ATrait Implementations§
Source§impl<A: StepSpec + Step> ForLoopGhostIterator for RangeGhostIterator<A>
impl<A: StepSpec + Step> ForLoopGhostIterator for RangeGhostIterator<A>
Source§open spec fn exec_invariant(&self, exec_iter: &Range<A>) -> bool
open spec fn exec_invariant(&self, exec_iter: &Range<A>) -> bool
{
&&& self.cur == exec_iter.start
&&& self.end == exec_iter.end
}Source§open spec fn ghost_invariant(&self, init: Option<&Self>) -> bool
open spec fn ghost_invariant(&self, init: Option<&Self>) -> bool
{
&&& self.start.spec_is_lt(self.cur) || self.start == self.cur
&&& self.cur.spec_is_lt(self.end) || self.cur == self.end
&&& if let Some(init) = init {
&&& init.start == init.cur
&&& init.start == self.start
&&& init.end == self.end
} else {
true
}
}Source§open spec fn ghost_ensures(&self) -> bool
open spec fn ghost_ensures(&self) -> bool
{ !self.cur.spec_is_lt(self.end) }Source§open spec fn ghost_decrease(&self) -> Option<int>
open spec fn ghost_decrease(&self) -> Option<int>
{ Some(self.cur.spec_steps_between_int(self.end)) }Source§open spec fn ghost_peek_next(&self) -> Option<A>
open spec fn ghost_peek_next(&self) -> Option<A>
{ Some(self.cur) }Source§open spec fn ghost_advance(&self, _exec_iter: &Range<A>) -> RangeGhostIterator<A>
open spec fn ghost_advance(&self, _exec_iter: &Range<A>) -> RangeGhostIterator<A>
{
RangeGhostIterator {
cur: self.cur.spec_forward_checked(1).unwrap(),
..*self
}
}type ExecIter = Range<A>
type Item = A
type Decrease = int
Auto Trait Implementations§
impl<A> Freeze for RangeGhostIterator<A>where
A: Freeze,
impl<A> RefUnwindSafe for RangeGhostIterator<A>where
A: RefUnwindSafe,
impl<A> Send for RangeGhostIterator<A>where
A: Send,
impl<A> Sync for RangeGhostIterator<A>where
A: Sync,
impl<A> Unpin for RangeGhostIterator<A>where
A: Unpin,
impl<A> UnwindSafe for RangeGhostIterator<A>where
A: UnwindSafe,
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
Source§impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
Source§impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
Source§exec fn obeys_try_from_spec() -> bool
exec fn obeys_try_from_spec() -> bool
Source§impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
Source§exec fn obeys_try_into_spec() -> bool
exec fn obeys_try_into_spec() -> bool
Source§impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
Source§open spec fn obeys_try_into_spec() -> bool
open spec fn obeys_try_into_spec() -> bool
{ <U as TryFromSpec<Self>>::obeys_try_from_spec() }