Trait std::ops::ShrAssign
pub trait ShrAssign<Rhs = Self> { fn shr_assign(&mut self, rhs: Rhs); }
The right shift assignment operator >>=
.
Examples
An implementation of ShrAssign
for a wrapper around usize
.
use std::ops::ShrAssign; #[derive(Debug, PartialEq)] struct Scalar(usize); impl ShrAssign<usize> for Scalar { fn shr_assign(&mut self, rhs: usize) { self.0 >>= rhs; } } let mut scalar = Scalar(16); scalar >>= 2; assert_eq!(scalar, Scalar(4));
Required methods
fn shr_assign(&mut self, rhs: Rhs)
Performs the >>=
operation.
Examples
let mut x: u8 = 5; x >>= 1; assert_eq!(x, 2); let mut x: u8 = 2; x >>= 1; assert_eq!(x, 1);
Implementors
impl ShrAssign<i8> for i8
impl ShrAssign<i8> for i16
impl ShrAssign<i8> for i32
impl ShrAssign<i8> for i64
impl ShrAssign<i8> for i128
impl ShrAssign<i8> for isize
impl ShrAssign<i8> for u8
impl ShrAssign<i8> for u16
impl ShrAssign<i8> for u32
impl ShrAssign<i8> for u64
impl ShrAssign<i8> for u128
impl ShrAssign<i8> for usize
impl ShrAssign<i16> for i8
impl ShrAssign<i16> for i16
impl ShrAssign<i16> for i32
impl ShrAssign<i16> for i64
impl ShrAssign<i16> for i128
impl ShrAssign<i16> for isize
impl ShrAssign<i16> for u8
impl ShrAssign<i16> for u16
impl ShrAssign<i16> for u32
impl ShrAssign<i16> for u64
impl ShrAssign<i16> for u128
impl ShrAssign<i16> for usize
impl ShrAssign<i32> for i8
impl ShrAssign<i32> for i16
impl ShrAssign<i32> for i32
impl ShrAssign<i32> for i64
impl ShrAssign<i32> for i128
impl ShrAssign<i32> for isize
impl ShrAssign<i32> for u8
impl ShrAssign<i32> for u16
impl ShrAssign<i32> for u32
impl ShrAssign<i32> for u64
impl ShrAssign<i32> for u128
impl ShrAssign<i32> for usize
impl ShrAssign<i64> for i8
impl ShrAssign<i64> for i16
impl ShrAssign<i64> for i32
impl ShrAssign<i64> for i64
impl ShrAssign<i64> for i128
impl ShrAssign<i64> for isize
impl ShrAssign<i64> for u8
impl ShrAssign<i64> for u16
impl ShrAssign<i64> for u32
impl ShrAssign<i64> for u64
impl ShrAssign<i64> for u128
impl ShrAssign<i64> for usize
impl ShrAssign<i128> for i8
impl ShrAssign<i128> for i16
impl ShrAssign<i128> for i32
impl ShrAssign<i128> for i64
impl ShrAssign<i128> for i128
impl ShrAssign<i128> for isize
impl ShrAssign<i128> for u8
impl ShrAssign<i128> for u16
impl ShrAssign<i128> for u32
impl ShrAssign<i128> for u64
impl ShrAssign<i128> for u128
impl ShrAssign<i128> for usize
impl ShrAssign<isize> for i8
impl ShrAssign<isize> for i16
impl ShrAssign<isize> for i32
impl ShrAssign<isize> for i64
impl ShrAssign<isize> for i128
impl ShrAssign<isize> for isize
impl ShrAssign<isize> for u8
impl ShrAssign<isize> for u16
impl ShrAssign<isize> for u32
impl ShrAssign<isize> for u64
impl ShrAssign<isize> for u128
impl ShrAssign<isize> for usize
impl ShrAssign<u8> for i8
impl ShrAssign<u8> for i16
impl ShrAssign<u8> for i32
impl ShrAssign<u8> for i64
impl ShrAssign<u8> for i128
impl ShrAssign<u8> for isize
impl ShrAssign<u8> for u8
impl ShrAssign<u8> for u16
impl ShrAssign<u8> for u32
impl ShrAssign<u8> for u64
impl ShrAssign<u8> for u128
impl ShrAssign<u8> for usize
impl ShrAssign<u16> for i8
impl ShrAssign<u16> for i16
impl ShrAssign<u16> for i32
impl ShrAssign<u16> for i64
impl ShrAssign<u16> for i128
impl ShrAssign<u16> for isize
impl ShrAssign<u16> for u8
impl ShrAssign<u16> for u16
impl ShrAssign<u16> for u32
impl ShrAssign<u16> for u64
impl ShrAssign<u16> for u128
impl ShrAssign<u16> for usize
impl ShrAssign<u32> for i8
impl ShrAssign<u32> for i16
impl ShrAssign<u32> for i32
impl ShrAssign<u32> for i64
impl ShrAssign<u32> for i128
impl ShrAssign<u32> for isize
impl ShrAssign<u32> for u8
impl ShrAssign<u32> for u16
impl ShrAssign<u32> for u32
impl ShrAssign<u32> for u64
impl ShrAssign<u32> for u128
impl ShrAssign<u32> for usize
impl ShrAssign<u64> for i8
impl ShrAssign<u64> for i16
impl ShrAssign<u64> for i32
impl ShrAssign<u64> for i64
impl ShrAssign<u64> for i128
impl ShrAssign<u64> for isize
impl ShrAssign<u64> for u8
impl ShrAssign<u64> for u16
impl ShrAssign<u64> for u32
impl ShrAssign<u64> for u64
impl ShrAssign<u64> for u128
impl ShrAssign<u64> for usize
impl ShrAssign<u128> for i8
impl ShrAssign<u128> for i16
impl ShrAssign<u128> for i32
impl ShrAssign<u128> for i64
impl ShrAssign<u128> for i128
impl ShrAssign<u128> for isize
impl ShrAssign<u128> for u8
impl ShrAssign<u128> for u16
impl ShrAssign<u128> for u32
impl ShrAssign<u128> for u64
impl ShrAssign<u128> for u128
impl ShrAssign<u128> for usize
impl ShrAssign<usize> for i8
impl ShrAssign<usize> for i16
impl ShrAssign<usize> for i32
impl ShrAssign<usize> for i64
impl ShrAssign<usize> for i128
impl ShrAssign<usize> for isize
impl ShrAssign<usize> for u8
impl ShrAssign<usize> for u16
impl ShrAssign<usize> for u32
impl ShrAssign<usize> for u64
impl ShrAssign<usize> for u128
impl ShrAssign<usize> for usize
impl ShrAssign<usize> for Saturating<i8>
impl ShrAssign<usize> for Saturating<i16>
impl ShrAssign<usize> for Saturating<i32>
impl ShrAssign<usize> for Saturating<i64>
impl ShrAssign<usize> for Saturating<i128>
impl ShrAssign<usize> for Saturating<isize>
impl ShrAssign<usize> for Saturating<u8>
impl ShrAssign<usize> for Saturating<u16>
impl ShrAssign<usize> for Saturating<u32>
impl ShrAssign<usize> for Saturating<u64>
impl ShrAssign<usize> for Saturating<u128>
impl ShrAssign<usize> for Saturating<usize>
impl ShrAssign<usize> for Wrapping<i8>
impl ShrAssign<usize> for Wrapping<i16>
impl ShrAssign<usize> for Wrapping<i32>
impl ShrAssign<usize> for Wrapping<i64>
impl ShrAssign<usize> for Wrapping<i128>
impl ShrAssign<usize> for Wrapping<isize>
impl ShrAssign<usize> for Wrapping<u8>
impl ShrAssign<usize> for Wrapping<u16>
impl ShrAssign<usize> for Wrapping<u32>
impl ShrAssign<usize> for Wrapping<u64>
impl ShrAssign<usize> for Wrapping<u128>
impl ShrAssign<usize> for Wrapping<usize>
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ i8> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ i16> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ i32> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ i64> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ i128> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ isize> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ u8> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ u16> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ u32> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ u64> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ u128> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for i8
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for i16
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for i32
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for i64
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for i128
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for isize
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for u8
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for u16
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for u32
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for u64
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for u128
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for usize
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<i8>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<i16>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<i32>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<i64>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<i128>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<isize>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<u8>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<u16>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<u32>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<u64>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<u128>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Saturating<usize>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<i8>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<i16>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<i32>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<i64>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<i128>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<isize>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<u8>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<u16>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<u32>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<u64>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<u128>
[src]1.22.0
impl<'_> ShrAssign<&'_ usize> for Wrapping<usize>
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/ops/trait.ShrAssign.html