Trait BitsMutExt

Source
pub trait BitsMutExt: BitsMut {
    // Provided methods
    fn bit_assign<T: Bits<Block = Self::Block>>(&mut self, other: T) { ... }
    fn bit_and_assign<T: Bits<Block = Self::Block>>(&mut self, other: T) { ... }
    fn bit_or_assign<T: Bits<Block = Self::Block>>(&mut self, other: T) { ... }
    fn bit_xor_assign<T: Bits<Block = Self::Block>>(&mut self, other: T) { ... }
    fn bit_zip_assign<T, F>(&mut self, other: T, fun: F)
       where T: Bits<Block = Self::Block>,
             F: FnMut(Self::Block, Self::Block) -> Self::Block { ... }
}
Expand description

Extension trait for mutable operations on bit slices.

Provided Methods§

Source

fn bit_assign<T: Bits<Block = Self::Block>>(&mut self, other: T)

Assigns the bits of other to self.

§Panics

If self.bit_len() != other.bit_len().

Source

fn bit_and_assign<T: Bits<Block = Self::Block>>(&mut self, other: T)

Assigns the bit-wise and of self and other to self.

§Panics

If self.bit_len() != other.bit_len().

Source

fn bit_or_assign<T: Bits<Block = Self::Block>>(&mut self, other: T)

Assigns the bit-wise or of self and other to self.

§Panics

If self.bit_len() != other.bit_len().

Source

fn bit_xor_assign<T: Bits<Block = Self::Block>>(&mut self, other: T)

Assigns the bit-wise xor of self and other to self.

§Panics

If self.bit_len() != other.bit_len().

Source

fn bit_zip_assign<T, F>(&mut self, other: T, fun: F)
where T: Bits<Block = Self::Block>, F: FnMut(Self::Block, Self::Block) -> Self::Block,

Performs an op-assignment from other to self.

In particular, the given function is used to combine each block of self with a block of other, assigning the result back to self.

§Panics

If self.bit_len() != other.bit_len().

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.

Implementors§