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