Trait std::ops::BitAndAssign
[−]
[src]
pub trait BitAndAssign<Rhs = Self> { fn bitand_assign(&mut self, Rhs); }
Unstable (
op_assign_traits
): recently added
The BitAndAssign
trait is used to specify the functionality of &=
.
Examples
A trivial implementation of BitAndAssign
. When Foo &= Foo
happens, it ends up
calling bitand_assign
, and therefore, main
prints Bitwise And-ing!
.
#![feature(augmented_assignments)] #![feature(op_assign_traits)] use std::ops::BitAndAssign; struct Foo; impl BitAndAssign for Foo { fn bitand_assign(&mut self, _rhs: Foo) { println!("Bitwise And-ing!"); } } fn main() { let mut foo = Foo; foo &= Foo; }
Required Methods
fn bitand_assign(&mut self, Rhs)
Unstable (
op_assign_traits
): recently added
The method for the &
operator
Implementors
impl BitAndAssign<Wrapping<usize>> for Wrapping<usize>
impl BitAndAssign<Wrapping<u8>> for Wrapping<u8>
impl BitAndAssign<Wrapping<u16>> for Wrapping<u16>
impl BitAndAssign<Wrapping<u32>> for Wrapping<u32>
impl BitAndAssign<Wrapping<u64>> for Wrapping<u64>
impl BitAndAssign<Wrapping<isize>> for Wrapping<isize>
impl BitAndAssign<Wrapping<i8>> for Wrapping<i8>
impl BitAndAssign<Wrapping<i16>> for Wrapping<i16>
impl BitAndAssign<Wrapping<i32>> for Wrapping<i32>
impl BitAndAssign<Wrapping<i64>> for Wrapping<i64>
impl BitAndAssign<bool> for bool
impl BitAndAssign<usize> for usize
impl BitAndAssign<u8> for u8
impl BitAndAssign<u16> for u16
impl BitAndAssign<u32> for u32
impl BitAndAssign<u64> for u64
impl BitAndAssign<isize> for isize
impl BitAndAssign<i8> for i8
impl BitAndAssign<i16> for i16
impl BitAndAssign<i32> for i32
impl BitAndAssign<i64> for i64