pub struct NonZeroUsize {
pub inner: NonZero<usize>,
}Fields§
§inner: NonZero<usize>Implementations§
Source§impl NonZeroUsize
impl NonZeroUsize
Sourcepub uninterp fn nonzero_usize_from_usize(n: usize) -> Self
pub uninterp fn nonzero_usize_from_usize(n: usize) -> Self
Sourcepub broadcast proof fn axiom_nonzero_usize_from_usize_view_eq(n: usize)
pub broadcast proof fn axiom_nonzero_usize_from_usize_view_eq(n: usize)
requires
n != 0,ensures(#[trigger] Self::nonzero_usize_from_usize(n)).view() == n,Sourcepub broadcast proof fn axiom_view_nonzero_usize_from_usize_eq(self)
pub broadcast proof fn axiom_view_nonzero_usize_from_usize_eq(self)
ensures
Self::nonzero_usize_from_usize(#[trigger] self.view()) == self,Sourcepub const exec fn new(n: usize) -> ret : Option<Self>
pub const exec fn new(n: usize) -> ret : Option<Self>
ensures
match ret {
Some(nz) => nz.view() == n,
None => n == 0,
},Sourcepub const unsafe exec fn new_unchecked(n: usize) -> ret : Self
pub const unsafe exec fn new_unchecked(n: usize) -> ret : Self
ensures
ret.view() == n,ret == Self::nonzero_usize_from_usize(n),Trait Implementations§
Source§impl BitOr<usize> for NonZeroUsize
impl BitOr<usize> for NonZeroUsize
Source§impl BitOrSpecImpl<usize> for NonZeroUsize
impl BitOrSpecImpl<usize> for NonZeroUsize
Source§impl Clone for NonZeroUsize
impl Clone for NonZeroUsize
Source§impl Hash for NonZeroUsize
impl Hash for NonZeroUsize
Source§impl Ord for NonZeroUsize
impl Ord for NonZeroUsize
Source§fn cmp(&self, other: &NonZeroUsize) -> Ordering
fn cmp(&self, other: &NonZeroUsize) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl OrdSpecImpl for NonZeroUsize
impl OrdSpecImpl for NonZeroUsize
Source§impl PartialEq for NonZeroUsize
impl PartialEq for NonZeroUsize
Source§impl PartialEqSpecImpl for NonZeroUsize
impl PartialEqSpecImpl for NonZeroUsize
Source§impl PartialOrd for NonZeroUsize
impl PartialOrd for NonZeroUsize
Source§impl PartialOrdSpecImpl for NonZeroUsize
impl PartialOrdSpecImpl for NonZeroUsize
Source§open spec fn obeys_partial_cmp_spec() -> bool
open spec fn obeys_partial_cmp_spec() -> bool
{ true }Source§open spec fn partial_cmp_spec(&self, other: &Self) -> Option<Ordering>
open spec fn partial_cmp_spec(&self, other: &Self) -> Option<Ordering>
{
if self.view() < other.view() {
Some(Ordering::Less)
} else if self.view() > other.view() {
Some(Ordering::Greater)
} else {
Some(Ordering::Equal)
}
}impl Copy for NonZeroUsize
impl Eq for NonZeroUsize
impl StructuralPartialEq for NonZeroUsize
Auto Trait Implementations§
impl Freeze for NonZeroUsize
impl RefUnwindSafe for NonZeroUsize
impl Send for NonZeroUsize
impl Sync for NonZeroUsize
impl Unpin for NonZeroUsize
impl UnsafeUnpin for NonZeroUsize
impl UnwindSafe for NonZeroUsize
Blanket Implementations§
§impl<Rhs, VERUS_SPEC__A> BitOrSpec<Rhs> for VERUS_SPEC__A
impl<Rhs, VERUS_SPEC__A> BitOrSpec<Rhs> for VERUS_SPEC__A
fn obeys_bitor_spec() -> bool
fn bitor_req(self, rhs: Rhs) -> bool
fn bitor_spec(self, rhs: Rhs) -> <VERUS_SPEC__A as BitOr<Rhs>>::Output
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