pub struct Int;Expand description
An unbounded, mathematical integer.
This type cannot be only be constructed in logical or ghost code.
§Integers in pearlite
Note that in pearlite, all integer literals are of type Int:
let x = 1i32;
// ↓ need to use the view operator to convert `i32` to `Int`
proof_assert!(x@ == 1);You can use the usual operators on integers: +, -, *, / and %.
Note that those operators are not available in ghost code.
Implementations§
Trait Implementations§
Source§impl<T> IndexLogic<Int> for Vec<T>
Available on non-crate feature nightly only.Dummy impls that don’t use the unstable trait Allocator
impl<T> IndexLogic<Int> for Vec<T>
Available on non-crate feature
nightly only.Dummy impls that don’t use the unstable trait Allocator
Source§impl PartialOrd for Int
impl PartialOrd for Int
impl Copy for Int
impl OrdLogic for Int
impl Plain for Int
impl WellFounded for Int
Auto Trait Implementations§
impl Freeze for Int
impl RefUnwindSafe for Int
impl Send for Int
impl Sync for Int
impl Unpin for Int
impl UnwindSafe for Int
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