pub struct VerusOrderPreservingProof { /* private fields */ }Expand description
A machine-checked proof of order preservation, verified by Verus.
Created by the verus_proof_order_preserving_map! macro, which generates the
obligation directly from the actual closure body: for any two inputs x <= y
(with respect to the input type’s PartialOrd), the outputs must satisfy
f(x) <= f(y) (with respect to the output type’s PartialOrd). This is exactly
what is needed for a Singleton::map to keep a Monotonic singleton monotonic.
Users never write (and cannot weaken) the assertion; they only declare the types
involved and, optionally, provide a proof script to help the SMT solver, which is
itself checked by Verus.
When the crate is verified with cargo verus verify, Verus checks the obligation
(which also proves the closure body panic-free). Under normal compilation, the proof
is erased and this type simply marks the property as proven. This type only
implements OrderPreservingProof, so it cannot be used to fulfill a different
property.
Trait Implementations§
Source§impl Default for VerusOrderPreservingProof
impl Default for VerusOrderPreservingProof
Source§impl OrderPreservingProof for VerusOrderPreservingProof
impl OrderPreservingProof for VerusOrderPreservingProof
Source§fn register_proof(&self, _expr: &Expr)
fn register_proof(&self, _expr: &Expr)
Auto Trait Implementations§
impl Forget for VerusOrderPreservingProof
impl Freeze for VerusOrderPreservingProof
impl Move for VerusOrderPreservingProof
impl RefUnwindSafe for VerusOrderPreservingProof
impl Send for VerusOrderPreservingProof
impl Sync for VerusOrderPreservingProof
impl Unpin for VerusOrderPreservingProof
impl UnsafeUnpin for VerusOrderPreservingProof
impl UnwindSafe for VerusOrderPreservingProof
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more