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