Trait std::ops::BitOr
[−]
[src]
pub trait BitOr<RHS = Self> { type Output; fn bitor(self, rhs: RHS) -> Self::Output; }
The BitOr
trait is used to specify the functionality of |
.
Examples
A trivial implementation of BitOr
. When Foo | Foo
happens, it ends up
calling bitor
, and therefore, main
prints Bitwise Or-ing!
.
use std::ops::BitOr; struct Foo; impl BitOr for Foo { type Output = Foo; fn bitor(self, _rhs: Foo) -> Foo { println!("Bitwise Or-ing!"); self } } fn main() { Foo | Foo; }
Associated Types
type Output
The resulting type after applying the |
operator
Required Methods
Implementors
impl<'a, 'b> BitOr for &'b i64
impl<'a> BitOr for i64
impl<'a> BitOr for &'a i64
impl BitOr for i64
impl<'a, 'b> BitOr for &'b i32
impl<'a> BitOr for i32
impl<'a> BitOr for &'a i32
impl BitOr for i32
impl<'a, 'b> BitOr for &'b i16
impl<'a> BitOr for i16
impl<'a> BitOr for &'a i16
impl BitOr for i16
impl<'a, 'b> BitOr for &'b i8
impl<'a> BitOr for i8
impl<'a> BitOr for &'a i8
impl BitOr for i8
impl<'a, 'b> BitOr for &'b isize
impl<'a> BitOr for isize
impl<'a> BitOr for &'a isize
impl BitOr for isize
impl<'a, 'b> BitOr for &'b u64
impl<'a> BitOr for u64
impl<'a> BitOr for &'a u64
impl BitOr for u64
impl<'a, 'b> BitOr for &'b u32
impl<'a> BitOr for u32
impl<'a> BitOr for &'a u32
impl BitOr for u32
impl<'a, 'b> BitOr for &'b u16
impl<'a> BitOr for u16
impl<'a> BitOr for &'a u16
impl BitOr for u16
impl<'a, 'b> BitOr for &'b u8
impl<'a> BitOr for u8
impl<'a> BitOr for &'a u8
impl BitOr for u8
impl<'a, 'b> BitOr for &'b usize
impl<'a> BitOr for usize
impl<'a> BitOr for &'a usize
impl BitOr for usize
impl<'a, 'b> BitOr for &'b bool
impl<'a> BitOr for bool
impl<'a> BitOr for &'a bool
impl BitOr for bool
impl BitOr for Wrapping<i64>
impl BitOr for Wrapping<i32>
impl BitOr for Wrapping<i16>
impl BitOr for Wrapping<i8>
impl BitOr for Wrapping<isize>
impl BitOr for Wrapping<u64>
impl BitOr for Wrapping<u32>
impl BitOr for Wrapping<u16>
impl BitOr for Wrapping<u8>
impl BitOr for Wrapping<usize>
impl<'a, 'b, T, S> BitOr for &'a HashSet<T, S> where T: Eq + Hash + Clone, S: BuildHasher + Default