Skip to main content

BitArithmetic

Trait BitArithmetic 

Source
pub trait BitArithmetic:
    Sized
    + Copy
    + Shl<Output = Self>
    + ShlAssign
    + Shr<Output = Self>
    + ShrAssign
    + BitOr<Output = Self>
    + BitOrAssign
    + BitAnd<Output = Self>
    + BitAndAssign
    + BitXor<Output = Self>
    + BitXorAssign
    + Not<Output = Self> { }
Expand description

For every type that support bit based operation (and &, or |, xor ^, not !, shift << / >>…)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> BitArithmetic for T
where T: Copy + ShrAssign + BitOr<Output = T> + Shl<Output = T> + BitOrAssign + BitAnd<Output = T> + BitAndAssign + BitXor<Output = T> + ShlAssign + BitXorAssign + Not<Output = T> + Shr<Output = T>,