Trait std::ops::BitOrExperimental
[-]
[+]
[src]
pub trait BitOr<RHS, Result> {
fn bitor(self, rhs: RHS) -> Result;
}The BitOr trait is used to specify the functionality of |.
Example
A trivial implementation of BitOr. When Foo | Foo happens, it ends up
calling bitor, and therefore, main prints Bitwise Or-ing!.
#[deriving(Copy)] struct Foo; impl BitOr<Foo, Foo> for Foo { fn bitor(self, _rhs: Foo) -> Foo { println!("Bitwise Or-ing!"); self } } fn main() { Foo | Foo; }
Required Methods
fn bitor(self, rhs: RHS) -> Result
The method for the | operator
Implementors
impl BitOr<bool, bool> for boolimpl BitOr<uint, uint> for uintimpl BitOr<u8, u8> for u8impl BitOr<u16, u16> for u16impl BitOr<u32, u32> for u32impl BitOr<u64, u64> for u64impl BitOr<int, int> for intimpl BitOr<i8, i8> for i8impl BitOr<i16, i16> for i16impl BitOr<i32, i32> for i32impl BitOr<i64, i64> for i64impl BitOr<FilePermission, FilePermission> for FilePermissionimpl<'a, 'b, T: Eq + Hash<S> + Clone, S, H: Hasher<S> + Default> BitOr<&'b HashSet<T, H>, HashSet<T, H>> for &'a HashSet<T, H>impl<'a, 'b, T: Eq + Hash<S> + Clone, S, H: Hasher<S> + Default> BitOr<&'b HashSet<T, H>, HashSet<T, H>> for &'a HashSet<T, H>impl<'a, 'b, T: Ord + Clone> BitOr<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T>impl<E: CLike> BitOr<EnumSet<E>, EnumSet<E>> for EnumSet<E>