Primitive Type usize [-]  [+]

Operations and constants for pointer-sized unsigned integers (usize type)

This type was recently added to replace uint. The rollout of the new type will gradually take place over the alpha cycle along with the development of clearer conventions around integer types.

Trait Implementations

impl Int for usize

fn zero() -> usize

fn one() -> usize

fn min_value() -> usize

fn max_value() -> usize

fn count_ones(self) -> usize

fn leading_zeros(self) -> usize

fn trailing_zeros(self) -> usize

fn rotate_left(self, n: usize) -> usize

fn rotate_right(self, n: usize) -> usize

fn swap_bytes(self) -> usize

fn checked_add(self, other: usize) -> Option<usize>

fn checked_sub(self, other: usize) -> Option<usize>

fn checked_mul(self, other: usize) -> Option<usize>

fn checked_div(self, v: usize) -> Option<usize>

fn count_zeros(self) -> usize

fn from_be(usize) -> usize

fn from_le(usize) -> usize

fn to_be(self) -> usize

fn to_le(self) -> usize

fn saturating_add(self, usize) -> usize

fn saturating_sub(self, usize) -> usize

fn pow(self, usize) -> usize

impl UnsignedInt for usize

fn is_power_of_two(self) -> bool

fn next_power_of_two(self) -> usize

fn checked_next_power_of_two(self) -> Option<usize>

impl ToPrimitive for usize

fn to_int(&self) -> Option<isize>

fn to_i8(&self) -> Option<i8>

fn to_i16(&self) -> Option<i16>

fn to_i32(&self) -> Option<i32>

fn to_i64(&self) -> Option<i64>

fn to_uint(&self) -> Option<usize>

fn to_u8(&self) -> Option<u8>

fn to_u16(&self) -> Option<u16>

fn to_u32(&self) -> Option<u32>

fn to_u64(&self) -> Option<u64>

fn to_f32(&self) -> Option<f32>

fn to_f64(&self) -> Option<f64>

fn to_int(&self) -> Option<isize>

fn to_i8(&self) -> Option<i8>

fn to_i16(&self) -> Option<i16>

fn to_i32(&self) -> Option<i32>

fn to_uint(&self) -> Option<usize>

fn to_u8(&self) -> Option<u8>

fn to_u16(&self) -> Option<u16>

fn to_u32(&self) -> Option<u32>

fn to_f32(&self) -> Option<f32>

fn to_f64(&self) -> Option<f64>

impl FromPrimitive for usize

fn from_int(n: isize) -> Option<usize>

fn from_i8(n: i8) -> Option<usize>

fn from_i16(n: i16) -> Option<usize>

fn from_i32(n: i32) -> Option<usize>

fn from_i64(n: i64) -> Option<usize>

fn from_uint(n: usize) -> Option<usize>

fn from_u8(n: u8) -> Option<usize>

fn from_u16(n: u16) -> Option<usize>

fn from_u32(n: u32) -> Option<usize>

fn from_u64(n: u64) -> Option<usize>

fn from_f32(n: f32) -> Option<usize>

fn from_f64(n: f64) -> Option<usize>

fn from_int(isize) -> Option<usize>

fn from_i8(i8) -> Option<usize>

fn from_i16(i16) -> Option<usize>

fn from_i32(i32) -> Option<usize>

fn from_uint(usize) -> Option<usize>

fn from_u8(u8) -> Option<usize>

fn from_u16(u16) -> Option<usize>

fn from_u32(u32) -> Option<usize>

fn from_f32(f32) -> Option<usize>

fn from_f64(f64) -> Option<usize>

impl NumCast for usize

fn from<N: ToPrimitive>(n: N) -> Option<usize>

impl FromStr for usize

fn from_str(src: &str) -> Option<usize>

impl FromStrRadix for usize

fn from_str_radix(src: &str, radix: usize) -> Option<usize>

impl Zeroable for usize

impl Add<usize> for usize

fn add(self, other: usize) -> usize

type Output

impl Sub<usize> for usize

fn sub(self, other: usize) -> usize

type Output

impl Mul<usize> for usize

fn mul(self, other: usize) -> usize

type Output

impl Div<usize> for usize

fn div(self, other: usize) -> usize

type Output

impl Rem<usize> for usize

fn rem(self, other: usize) -> usize

type Output

impl Neg for usize

fn neg(self) -> usize

type Output

impl Not for usize

fn not(self) -> usize

type Output

impl BitAnd<usize> for usize

fn bitand(self, rhs: usize) -> usize

type Output

impl BitOr<usize> for usize

fn bitor(self, rhs: usize) -> usize

type Output

impl BitXor<usize> for usize

fn bitxor(self, other: usize) -> usize

type Output

impl Shl<usize> for usize

fn shl(self, other: usize) -> usize

type Output

impl Shr<usize> for usize

fn shr(self, other: usize) -> usize

type Output

impl PartialEq<usize> for usize

fn eq(&self, other: &usize) -> bool

fn ne(&self, other: &usize) -> bool

fn ne(&self, &usize) -> bool

impl Eq for usize

fn assert_receiver_is_total_eq(&self)

impl PartialOrd<usize> for usize

fn partial_cmp(&self, other: &usize) -> Option<Ordering>

fn lt(&self, other: &usize) -> bool

fn le(&self, other: &usize) -> bool

fn ge(&self, other: &usize) -> bool

fn gt(&self, other: &usize) -> bool

fn lt(&self, &usize) -> bool

fn le(&self, &usize) -> bool

fn gt(&self, &usize) -> bool

fn ge(&self, &usize) -> bool

impl Ord for usize

fn cmp(&self, other: &usize) -> Ordering

impl Clone for usize

fn clone(&self) -> usize

Return a deep copy of the value.

fn clone_from(&mut self, &usize)

impl Default for usize

fn default() -> usize

impl Step for usize

fn step(&mut self)

fn step_back(&mut self)

fn steps_between(start: &usize, end: &usize) -> Option<usize>

impl<S: Hasher + Writer> Hash<S> for usize

fn hash(&self, state: &mut S)

impl String for usize

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl Binary for usize

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl Octal for usize

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl LowerHex for usize

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl UpperHex for usize

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl Show for usize

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl SampleRange for usize

fn construct_range(low: usize, high: usize) -> Range<usize>

fn sample_range<R: Rng>(r: &Range<usize>, rng: &mut R) -> usize

impl Rand for usize

fn rand<R: Rng>(rng: &mut R) -> usize