#[lang = "bitxor_assign"]
pub trait BitXorAssign<Rhs = Self> {
fn bitxor_assign(&mut self, rhs: Rhs);
}
The bitwise XOR assignment operator ^=
.
use std::ops::BitXorAssign;
#[derive(Debug, PartialEq)]
struct Personality {
has_soul: bool,
likes_knitting: bool,
}
impl BitXorAssign for Personality {
fn bitxor_assign(&mut self, rhs: Self) {
self.has_soul ^= rhs.has_soul;
self.likes_knitting ^= rhs.likes_knitting;
}
}
let mut personality = Personality { has_soul: false, likes_knitting: true };
personality ^= Personality { has_soul: true, likes_knitting: true };
assert_eq!(personality, Personality { has_soul: true, likes_knitting: false});Run
Performs the ^=
operation.
Loading content...
impl BitXorAssign<bool> for bool
[src]
impl BitXorAssign<i128> for i128
[src]
impl BitXorAssign<i16> for i16
[src]
impl BitXorAssign<i32> for i32
[src]
impl BitXorAssign<i64> for i64
[src]
impl BitXorAssign<i8> for i8
[src]
impl BitXorAssign<isize> for isize
[src]
impl BitXorAssign<u128> for u128
[src]
impl BitXorAssign<u16> for u16
[src]
impl BitXorAssign<u32> for u32
[src]
impl BitXorAssign<u64> for u64
[src]
impl BitXorAssign<u8> for u8
[src]
impl BitXorAssign<usize> for usize
[src]
impl<'_> BitXorAssign<&'_ Wrapping<i128>> for Wrapping<i128>
[src]
impl<'_> BitXorAssign<&'_ Wrapping<isize>> for Wrapping<isize>
[src]
impl<'_> BitXorAssign<&'_ Wrapping<u128>> for Wrapping<u128>
[src]
impl<'_> BitXorAssign<&'_ Wrapping<usize>> for Wrapping<usize>
[src]
impl<'_> BitXorAssign<&'_ bool> for bool
[src]
impl<'_> BitXorAssign<&'_ i128> for i128
[src]
impl<'_> BitXorAssign<&'_ i16> for i16
[src]
impl<'_> BitXorAssign<&'_ i32> for i32
[src]
impl<'_> BitXorAssign<&'_ i64> for i64
[src]
impl<'_> BitXorAssign<&'_ i8> for i8
[src]
impl<'_> BitXorAssign<&'_ isize> for isize
[src]
impl<'_> BitXorAssign<&'_ u128> for u128
[src]
impl<'_> BitXorAssign<&'_ u16> for u16
[src]
impl<'_> BitXorAssign<&'_ u32> for u32
[src]
impl<'_> BitXorAssign<&'_ u64> for u64
[src]
impl<'_> BitXorAssign<&'_ u8> for u8
[src]
impl<'_> BitXorAssign<&'_ usize> for usize
[src]
Loading content...