Trait core::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; #[derive(Copy, Clone)] 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 BitOr for Wrapping<usize>
impl BitOr for Wrapping<u8>
impl BitOr for Wrapping<u16>
impl BitOr for Wrapping<u32>
impl BitOr for Wrapping<u64>
impl BitOr for Wrapping<isize>
impl BitOr for Wrapping<i8>
impl BitOr for Wrapping<i16>
impl BitOr for Wrapping<i32>
impl BitOr for Wrapping<i64>
impl BitOr for bool
impl<'a> BitOr<bool> for &'a bool
impl<'a> BitOr<&'a bool> for bool
impl<'a, 'b> BitOr<&'a bool> for &'b bool
impl BitOr for usize
impl<'a> BitOr<usize> for &'a usize
impl<'a> BitOr<&'a usize> for usize
impl<'a, 'b> BitOr<&'a usize> for &'b usize
impl BitOr for u8
impl<'a> BitOr<u8> for &'a u8
impl<'a> BitOr<&'a u8> for u8
impl<'a, 'b> BitOr<&'a u8> for &'b u8
impl BitOr for u16
impl<'a> BitOr<u16> for &'a u16
impl<'a> BitOr<&'a u16> for u16
impl<'a, 'b> BitOr<&'a u16> for &'b u16
impl BitOr for u32
impl<'a> BitOr<u32> for &'a u32
impl<'a> BitOr<&'a u32> for u32
impl<'a, 'b> BitOr<&'a u32> for &'b u32
impl BitOr for u64
impl<'a> BitOr<u64> for &'a u64
impl<'a> BitOr<&'a u64> for u64
impl<'a, 'b> BitOr<&'a u64> for &'b u64
impl BitOr for isize
impl<'a> BitOr<isize> for &'a isize
impl<'a> BitOr<&'a isize> for isize
impl<'a, 'b> BitOr<&'a isize> for &'b isize
impl BitOr for i8
impl<'a> BitOr<i8> for &'a i8
impl<'a> BitOr<&'a i8> for i8
impl<'a, 'b> BitOr<&'a i8> for &'b i8
impl BitOr for i16
impl<'a> BitOr<i16> for &'a i16
impl<'a> BitOr<&'a i16> for i16
impl<'a, 'b> BitOr<&'a i16> for &'b i16
impl BitOr for i32
impl<'a> BitOr<i32> for &'a i32
impl<'a> BitOr<&'a i32> for i32
impl<'a, 'b> BitOr<&'a i32> for &'b i32
impl BitOr for i64
impl<'a> BitOr<i64> for &'a i64
impl<'a> BitOr<&'a i64> for i64
impl<'a, 'b> BitOr<&'a i64> for &'b i64
impl BitOr<u8x16> for u8x16
impl BitOr<u16x8> for u16x8
impl BitOr<u32x4> for u32x4
impl BitOr<u64x2> for u64x2
impl BitOr<i8x16> for i8x16
impl BitOr<i16x8> for i16x8
impl BitOr<i32x4> for i32x4
impl BitOr<i64x2> for i64x2