Expand description
Type invariants
See Invariant.
Structs§
- Guarded
Guardedis a wrapper around an object of typeT, which makes sure that a guard (a predicate onT) is satisfied when the guarded object disappears. It works by making the guard part of the type invariant ofGuarded, and uses some internal Creusot machinery to ensure that the guard never changes during the lifetime of theGuardedobject.- IsSome
- Guard an
Optionthat must remainSome. - Subset
- A subset type.
Traits§
- Guard
- Guards that can be used in
Guarded. - Guard
Ref - Guard predicate under mutable references.
- Inhabited
Invariant - A type implements
InhabitedInvariantwhen its type invariant is inhabited. This is needed to define subset types. - Invariant
- A user-defined type invariant.
Functions§
- inv
- Whether the invariant of a value holds