Trait SliceBitXorAssign

Source
pub trait SliceBitXorAssign<T>: Slice<Item = T> {
    // Required methods
    const fn bitxor_assign_all<Rhs>(&mut self, rhs: Rhs)
       where T: BitXorAssign<Rhs>,
             Rhs: Copy;
    const async fn bitxor_assign_all_async<Rhs>(&mut self, rhs: Rhs)
       where T: BitXorAssign<Rhs>,
             Rhs: Copy;
}

Required Methods§

Source

const fn bitxor_assign_all<Rhs>(&mut self, rhs: Rhs)
where T: BitXorAssign<Rhs>, Rhs: Copy,

Performs a bitwise XOR on each element using rhs.

§Example
use slice_ops::ops::*;
 
let mut x = [0b1, 0b10, 0b11, 0b100, 0b101, 0b110, 0b111, 0b1000];
 
x.bitxor_assign_all(0b10);
    
assert_eq!(x, [0b11, 0b0, 0b1, 0b110, 0b111, 0b100, 0b101, 0b1010]);
Source

const async fn bitxor_assign_all_async<Rhs>(&mut self, rhs: Rhs)
where T: BitXorAssign<Rhs>, Rhs: Copy,

Asynchronously performs a bitwise XOR on each element using rhs.

§Example
use slice_ops::ops::*;
 
let mut x = [0b1, 0b10, 0b11, 0b100, 0b101, 0b110, 0b111, 0b1000];
 
x.bitxor_assign_all_async(0b10).await;
    
assert_eq!(x, [0b11, 0b0, 0b1, 0b110, 0b111, 0b100, 0b101, 0b1010]);

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.

Implementations on Foreign Types§

Source§

impl<T> SliceBitXorAssign<T> for [T]

Source§

fn bitxor_assign_all<Rhs>(&mut self, rhs: Rhs)
where T: BitXorAssign<Rhs>, Rhs: Copy,

Source§

async fn bitxor_assign_all_async<Rhs>(&mut self, rhs: Rhs)
where T: BitXorAssign<Rhs>, Rhs: Copy,

Implementors§