pub trait SliceShrAssign<T>: Slice<Item = T> {
// Required methods
const fn shr_assign_all<Rhs>(&mut self, rhs: Rhs)
where T: ShrAssign<Rhs>,
Rhs: Copy;
const async fn shr_assign_all_async<Rhs>(&mut self, rhs: Rhs)
where T: ShrAssign<Rhs>,
Rhs: Copy;
}Required Methods§
Sourceconst fn shr_assign_all<Rhs>(&mut self, rhs: Rhs)
const fn shr_assign_all<Rhs>(&mut self, rhs: Rhs)
Shifts each element to the right by rhs.
§Example
use slice_ops::ops::*;
let mut x = [0b1, 0b10, 0b11, 0b100, 0b101, 0b110, 0b111, 0b1000];
x.shr_assign_all(2);
assert_eq!(x, [0b0, 0b0, 0b0, 0b1, 0b1, 0b1, 0b1, 0b10]);Sourceconst async fn shr_assign_all_async<Rhs>(&mut self, rhs: Rhs)
const async fn shr_assign_all_async<Rhs>(&mut self, rhs: Rhs)
Asynchronously shifts each element to the right by rhs.
§Example
use slice_ops::ops::*;
let mut x = [0b1, 0b10, 0b11, 0b100, 0b101, 0b110, 0b111, 0b1000];
x.shr_assign_all_async(2).await;
assert_eq!(x, [0b0, 0b0, 0b0, 0b1, 0b1, 0b1, 0b1, 0b10]);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.