# Trait std::ops::BitXorAssign 1.8.0 [−] [src]

    #[lang = "bitxor_assign"]
    pub trait BitXorAssign<Rhs = Self> {
        fn bitxor_assign(&mut self, rhs: Rhs);
    }

The bitwise XOR assignment operator `^=`.

# Examples

A trivial implementation of `BitXorAssign`. When `Foo ^= Foo` happens, it ends up calling `bitxor_assign`, and therefore, `main` prints `Bitwise Xor-ing!`.

    use std::ops::BitXorAssign;

    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;
    }Run

## Required Methods

### `fn bitxor_assign(&mut self, rhs: Rhs)`

The method for the `^=` operator

## Implementors

- `impl BitXorAssign<isize> for isize`
- `impl BitXorAssign<u64> for u64`
- `impl BitXorAssign<Wrapping<i128>> for Wrapping<i128>`
- `impl BitXorAssign<Wrapping<u64>> for Wrapping<u64>`
- `impl BitXorAssign<Wrapping<i64>> for Wrapping<i64>`
- `impl BitXorAssign<Wrapping<u8>> for Wrapping<u8>`
- `impl BitXorAssign<Wrapping<u32>> for Wrapping<u32>`
- `impl BitXorAssign<Wrapping<isize>> for Wrapping<isize>`
- `impl BitXorAssign<Wrapping<usize>> for Wrapping<usize>`
- `impl BitXorAssign<Wrapping<u16>> for Wrapping<u16>`
- `impl BitXorAssign<i128> for i128`
- `impl BitXorAssign<u128> for u128`
- `impl BitXorAssign<Wrapping<i8>> for Wrapping<i8>`
- `impl BitXorAssign<u32> for u32`
- `impl BitXorAssign<Wrapping<u128>> for Wrapping<u128>`
- `impl BitXorAssign<usize> for usize`
- `impl BitXorAssign<u8> for u8`
- `impl BitXorAssign<bool> for bool`
- `impl BitXorAssign<i64> for i64`
- `impl BitXorAssign<i32> for i32`
- `impl BitXorAssign<u16> for u16`
- `impl BitXorAssign<i8> for i8`
- `impl BitXorAssign<Wrapping<i32>> for Wrapping<i32>`
- `impl BitXorAssign<i16> for i16`
- `impl BitXorAssign<Wrapping<i16>> for Wrapping<i16>`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)