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 i64impl<'a> BitAnd for i64impl<'a> BitAnd for &'a i64impl BitAnd for i64impl<'a, 'b> BitAnd for &'b i32impl<'a> BitAnd for i32impl<'a> BitAnd for &'a i32impl BitAnd for i32impl<'a, 'b> BitAnd for &'b i16impl<'a> BitAnd for i16impl<'a> BitAnd for &'a i16impl BitAnd for i16impl<'a, 'b> BitAnd for &'b i8impl<'a> BitAnd for i8impl<'a> BitAnd for &'a i8impl BitAnd for i8impl<'a, 'b> BitAnd for &'b isizeimpl<'a> BitAnd for isizeimpl<'a> BitAnd for &'a isizeimpl BitAnd for isizeimpl<'a, 'b> BitAnd for &'b u64impl<'a> BitAnd for u64impl<'a> BitAnd for &'a u64impl BitAnd for u64impl<'a, 'b> BitAnd for &'b u32impl<'a> BitAnd for u32impl<'a> BitAnd for &'a u32impl BitAnd for u32impl<'a, 'b> BitAnd for &'b u16impl<'a> BitAnd for u16impl<'a> BitAnd for &'a u16impl BitAnd for u16impl<'a, 'b> BitAnd for &'b u8impl<'a> BitAnd for u8impl<'a> BitAnd for &'a u8impl BitAnd for u8impl<'a, 'b> BitAnd for &'b usizeimpl<'a> BitAnd for usizeimpl<'a> BitAnd for &'a usizeimpl BitAnd for usizeimpl<'a, 'b> BitAnd for &'b boolimpl<'a> BitAnd for boolimpl<'a> BitAnd for &'a boolimpl BitAnd for boolimpl 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