Trait rug::ops::BitXorFrom [−][src]
pub trait BitXorFrom<Lhs = Self> { fn bitxor_from(&mut self, lhs: Lhs); }
Compound bitwise XOR and assignment to the rhs operand.
rhs.bitxor_from(lhs)
has the same effect as rhs = lhs ^ rhs
.
Examples
use rug::ops::BitXorFrom; struct U(u32); impl BitXorFrom<u32> for U { fn bitxor_from(&mut self, lhs: u32) { self.0 = lhs ^ self.0; } } let mut u = U(0xf); u.bitxor_from(0xff); assert_eq!(u.0, 0xf0);
Required Methods
fn bitxor_from(&mut self, lhs: Lhs)
Peforms the XOR operation.
Examples
use rug::Integer; use rug::ops::BitXorFrom; let mut rhs = Integer::from(0xf0); rhs.bitxor_from(0x33); // rhs = 0x33 ^ 0xf0 assert_eq!(rhs, 0xc3);
Implementations on Foreign Types
impl BitXorFrom for i8
[src]
impl BitXorFrom for i8
fn bitxor_from(&mut self, lhs: i8)
[src]
fn bitxor_from(&mut self, lhs: i8)
impl<'a> BitXorFrom<&'a i8> for i8
[src]
impl<'a> BitXorFrom<&'a i8> for i8
fn bitxor_from(&mut self, lhs: &i8)
[src]
fn bitxor_from(&mut self, lhs: &i8)
impl BitXorFrom for i16
[src]
impl BitXorFrom for i16
fn bitxor_from(&mut self, lhs: i16)
[src]
fn bitxor_from(&mut self, lhs: i16)
impl<'a> BitXorFrom<&'a i16> for i16
[src]
impl<'a> BitXorFrom<&'a i16> for i16
fn bitxor_from(&mut self, lhs: &i16)
[src]
fn bitxor_from(&mut self, lhs: &i16)
impl BitXorFrom for i32
[src]
impl BitXorFrom for i32
fn bitxor_from(&mut self, lhs: i32)
[src]
fn bitxor_from(&mut self, lhs: i32)
impl<'a> BitXorFrom<&'a i32> for i32
[src]
impl<'a> BitXorFrom<&'a i32> for i32
fn bitxor_from(&mut self, lhs: &i32)
[src]
fn bitxor_from(&mut self, lhs: &i32)
impl BitXorFrom for i64
[src]
impl BitXorFrom for i64
fn bitxor_from(&mut self, lhs: i64)
[src]
fn bitxor_from(&mut self, lhs: i64)
impl<'a> BitXorFrom<&'a i64> for i64
[src]
impl<'a> BitXorFrom<&'a i64> for i64
fn bitxor_from(&mut self, lhs: &i64)
[src]
fn bitxor_from(&mut self, lhs: &i64)
impl BitXorFrom for i128
[src]
impl BitXorFrom for i128
fn bitxor_from(&mut self, lhs: i128)
[src]
fn bitxor_from(&mut self, lhs: i128)
impl<'a> BitXorFrom<&'a i128> for i128
[src]
impl<'a> BitXorFrom<&'a i128> for i128
fn bitxor_from(&mut self, lhs: &i128)
[src]
fn bitxor_from(&mut self, lhs: &i128)
impl BitXorFrom for isize
[src]
impl BitXorFrom for isize
fn bitxor_from(&mut self, lhs: isize)
[src]
fn bitxor_from(&mut self, lhs: isize)
impl<'a> BitXorFrom<&'a isize> for isize
[src]
impl<'a> BitXorFrom<&'a isize> for isize
fn bitxor_from(&mut self, lhs: &isize)
[src]
fn bitxor_from(&mut self, lhs: &isize)
impl BitXorFrom for u8
[src]
impl BitXorFrom for u8
fn bitxor_from(&mut self, lhs: u8)
[src]
fn bitxor_from(&mut self, lhs: u8)
impl<'a> BitXorFrom<&'a u8> for u8
[src]
impl<'a> BitXorFrom<&'a u8> for u8
fn bitxor_from(&mut self, lhs: &u8)
[src]
fn bitxor_from(&mut self, lhs: &u8)
impl BitXorFrom for u16
[src]
impl BitXorFrom for u16
fn bitxor_from(&mut self, lhs: u16)
[src]
fn bitxor_from(&mut self, lhs: u16)
impl<'a> BitXorFrom<&'a u16> for u16
[src]
impl<'a> BitXorFrom<&'a u16> for u16
fn bitxor_from(&mut self, lhs: &u16)
[src]
fn bitxor_from(&mut self, lhs: &u16)
impl BitXorFrom for u32
[src]
impl BitXorFrom for u32
fn bitxor_from(&mut self, lhs: u32)
[src]
fn bitxor_from(&mut self, lhs: u32)
impl<'a> BitXorFrom<&'a u32> for u32
[src]
impl<'a> BitXorFrom<&'a u32> for u32
fn bitxor_from(&mut self, lhs: &u32)
[src]
fn bitxor_from(&mut self, lhs: &u32)
impl BitXorFrom for u64
[src]
impl BitXorFrom for u64
fn bitxor_from(&mut self, lhs: u64)
[src]
fn bitxor_from(&mut self, lhs: u64)
impl<'a> BitXorFrom<&'a u64> for u64
[src]
impl<'a> BitXorFrom<&'a u64> for u64
fn bitxor_from(&mut self, lhs: &u64)
[src]
fn bitxor_from(&mut self, lhs: &u64)
impl BitXorFrom for u128
[src]
impl BitXorFrom for u128
fn bitxor_from(&mut self, lhs: u128)
[src]
fn bitxor_from(&mut self, lhs: u128)
impl<'a> BitXorFrom<&'a u128> for u128
[src]
impl<'a> BitXorFrom<&'a u128> for u128
fn bitxor_from(&mut self, lhs: &u128)
[src]
fn bitxor_from(&mut self, lhs: &u128)
impl BitXorFrom for usize
[src]
impl BitXorFrom for usize
fn bitxor_from(&mut self, lhs: usize)
[src]
fn bitxor_from(&mut self, lhs: usize)
impl<'a> BitXorFrom<&'a usize> for usize
[src]
impl<'a> BitXorFrom<&'a usize> for usize
fn bitxor_from(&mut self, lhs: &usize)
[src]
fn bitxor_from(&mut self, lhs: &usize)