[−][src]Trait rug::ops::BitOrFrom
Compound bitwise OR and assignment to the rhs operand.
rhs.bitor_from(lhs) has the same effect as rhs = lhs | rhs.
Examples
use rug::ops::BitOrFrom; struct U(u32); impl BitOrFrom<u32> for U { fn bitor_from(&mut self, lhs: u32) { self.0 = lhs | self.0; } } let mut u = U(0xf); u.bitor_from(0xf0); assert_eq!(u.0, 0xff);
Required methods
fn bitor_from(&mut self, lhs: Lhs)
Peforms the OR operation.
Examples
use rug::Integer; use rug::ops::BitOrFrom; let mut rhs = Integer::from(0xf0); rhs.bitor_from(0x33); // rhs = 0x33 | 0xf0 assert_eq!(rhs, 0xf3);
Implementations on Foreign Types
impl BitOrFrom<bool> for bool[src]
impl BitOrFrom<bool> for boolfn bitor_from(&mut self, lhs: bool) | [src] |
impl<'a> BitOrFrom<&'a bool> for bool[src]
impl<'a> BitOrFrom<&'a bool> for boolfn bitor_from(&mut self, lhs: &bool) | [src] |
impl BitOrFrom<i8> for i8[src]
impl BitOrFrom<i8> for i8fn bitor_from(&mut self, lhs: i8) | [src] |
impl<'a> BitOrFrom<&'a i8> for i8[src]
impl<'a> BitOrFrom<&'a i8> for i8fn bitor_from(&mut self, lhs: &i8) | [src] |
impl BitOrFrom<i16> for i16[src]
impl BitOrFrom<i16> for i16fn bitor_from(&mut self, lhs: i16) | [src] |
impl<'a> BitOrFrom<&'a i16> for i16[src]
impl<'a> BitOrFrom<&'a i16> for i16fn bitor_from(&mut self, lhs: &i16) | [src] |
impl BitOrFrom<i32> for i32[src]
impl BitOrFrom<i32> for i32fn bitor_from(&mut self, lhs: i32) | [src] |
impl<'a> BitOrFrom<&'a i32> for i32[src]
impl<'a> BitOrFrom<&'a i32> for i32fn bitor_from(&mut self, lhs: &i32) | [src] |
impl BitOrFrom<i64> for i64[src]
impl BitOrFrom<i64> for i64fn bitor_from(&mut self, lhs: i64) | [src] |
impl<'a> BitOrFrom<&'a i64> for i64[src]
impl<'a> BitOrFrom<&'a i64> for i64fn bitor_from(&mut self, lhs: &i64) | [src] |
impl BitOrFrom<i128> for i128[src]
impl BitOrFrom<i128> for i128fn bitor_from(&mut self, lhs: i128) | [src] |
impl<'a> BitOrFrom<&'a i128> for i128[src]
impl<'a> BitOrFrom<&'a i128> for i128fn bitor_from(&mut self, lhs: &i128) | [src] |
impl BitOrFrom<isize> for isize[src]
impl BitOrFrom<isize> for isizefn bitor_from(&mut self, lhs: isize) | [src] |
impl<'a> BitOrFrom<&'a isize> for isize[src]
impl<'a> BitOrFrom<&'a isize> for isizefn bitor_from(&mut self, lhs: &isize) | [src] |
impl BitOrFrom<u8> for u8[src]
impl BitOrFrom<u8> for u8fn bitor_from(&mut self, lhs: u8) | [src] |
impl<'a> BitOrFrom<&'a u8> for u8[src]
impl<'a> BitOrFrom<&'a u8> for u8fn bitor_from(&mut self, lhs: &u8) | [src] |
impl BitOrFrom<u16> for u16[src]
impl BitOrFrom<u16> for u16fn bitor_from(&mut self, lhs: u16) | [src] |
impl<'a> BitOrFrom<&'a u16> for u16[src]
impl<'a> BitOrFrom<&'a u16> for u16fn bitor_from(&mut self, lhs: &u16) | [src] |
impl BitOrFrom<u32> for u32[src]
impl BitOrFrom<u32> for u32fn bitor_from(&mut self, lhs: u32) | [src] |
impl<'a> BitOrFrom<&'a u32> for u32[src]
impl<'a> BitOrFrom<&'a u32> for u32fn bitor_from(&mut self, lhs: &u32) | [src] |
impl BitOrFrom<u64> for u64[src]
impl BitOrFrom<u64> for u64fn bitor_from(&mut self, lhs: u64) | [src] |
impl<'a> BitOrFrom<&'a u64> for u64[src]
impl<'a> BitOrFrom<&'a u64> for u64fn bitor_from(&mut self, lhs: &u64) | [src] |
impl BitOrFrom<u128> for u128[src]
impl BitOrFrom<u128> for u128fn bitor_from(&mut self, lhs: u128) | [src] |
impl<'a> BitOrFrom<&'a u128> for u128[src]
impl<'a> BitOrFrom<&'a u128> for u128fn bitor_from(&mut self, lhs: &u128) | [src] |
impl BitOrFrom<usize> for usize[src]
impl BitOrFrom<usize> for usizefn bitor_from(&mut self, lhs: usize) | [src] |
impl<'a> BitOrFrom<&'a usize> for usize[src]
impl<'a> BitOrFrom<&'a usize> for usizefn bitor_from(&mut self, lhs: &usize) | [src] |
Implementors
impl BitOrFrom<i32> for Integer[src]
impl BitOrFrom<i32> for Integerfn bitor_from(&mut self, lhs: i32) | [src] |
impl BitOrFrom<u32> for Integer[src]
impl BitOrFrom<u32> for Integerfn bitor_from(&mut self, lhs: u32) | [src] |
impl BitOrFrom<Integer> for Integer[src]
impl BitOrFrom<Integer> for Integerfn bitor_from(&mut self, lhs: Integer) | [src] |
impl<'a> BitOrFrom<&'a Integer> for Integer[src]
impl<'a> BitOrFrom<&'a Integer> for Integerfn bitor_from(&mut self, lhs: &Integer) | [src] |
impl<'t> BitOrFrom<&'t i32> for Integer[src]
impl<'t> BitOrFrom<&'t i32> for Integerfn bitor_from(&mut self, lhs: &i32) | [src] |
impl<'t> BitOrFrom<&'t u32> for Integer[src]
impl<'t> BitOrFrom<&'t u32> for Integerfn bitor_from(&mut self, lhs: &u32) | [src] |