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