pub struct Difference<T, U>(pub T, pub U);Expand description
Bit-set wrapper that acts like set complement.
Effectively inverses all bits in the underlying bit-set.
Tuple Fields§
§0: T§1: UTrait Implementations§
Source§impl<T, U> BitComplement for Difference<T, U>where
T: BitComplement,
impl<T, U> BitComplement for Difference<T, U>where
T: BitComplement,
type Output = Union<<T as BitComplement>::Output, U>
fn complement(self) -> Self::Output
Source§impl<T, U, Y> BitDifference<Y> for Difference<T, U>where
T: BitDifference<Y>,
impl<T, U, Y> BitDifference<Y> for Difference<T, U>where
T: BitDifference<Y>,
type Output = Difference<<T as BitDifference<Y>>::Output, U>
Source§fn difference(self, rhs: Y) -> Self::Output
fn difference(self, rhs: Y) -> Self::Output
Returns bit-set has bits set for each index that has bit set in exactly one of two arguments.
Source§impl<T, U> BitEmpty for Difference<T, U>
impl<T, U> BitEmpty for Difference<T, U>
Source§impl<T, U> BitFull for Difference<T, U>
impl<T, U> BitFull for Difference<T, U>
Source§impl<T, U, Y> BitIntersection<Y> for Difference<T, U>where
T: BitIntersection<Y>,
impl<T, U, Y> BitIntersection<Y> for Difference<T, U>where
T: BitIntersection<Y>,
type Output = Difference<<T as BitIntersection<Y>>::Output, U>
Source§fn intersection(self, rhs: Y) -> Self::Output
fn intersection(self, rhs: Y) -> Self::Output
Returns bit-set with bits set for each index that has bit set in either of two arguments.
Source§impl<T, U> BitSearch for Difference<T, U>
impl<T, U> BitSearch for Difference<T, U>
Source§fn find_first_set(&self, lower_bound: usize) -> Option<usize>
fn find_first_set(&self, lower_bound: usize) -> Option<usize>
Searches for first bit set starting with
lower_bound.
Returns index of first bit set. Read moreSource§fn find_set_in_range<R>(&self, range: R) -> Option<usize>where
R: RangeBounds<usize>,
fn find_set_in_range<R>(&self, range: R) -> Option<usize>where
R: RangeBounds<usize>,
Searches for bit set specified range.
Returns index of bit set. Read more
Source§impl<T, U> BitSet for Difference<T, U>
impl<T, U> BitSet for Difference<T, U>
Source§impl<T, U> BitSetLimit for Difference<T, U>where
T: BitSetLimit,
U: BitUnsetLimit,
impl<T, U> BitSetLimit for Difference<T, U>where
T: BitSetLimit,
U: BitUnsetLimit,
Source§const MAX_SET_INDEX: usize
const MAX_SET_INDEX: usize
Largest possible bit index that can be set.
Any larger index will always be unset.
Setting larger index is now allowed. Read more
Source§impl<T, U> BitTest for Difference<T, U>
impl<T, U> BitTest for Difference<T, U>
Source§impl<T, U> BitTestAll for Difference<T, U>where
T: BitTestAll,
U: BitTestNone,
impl<T, U> BitTestAll for Difference<T, U>where
T: BitTestAll,
U: BitTestNone,
Source§impl<T, U> BitTestNone for Difference<T, U>where
T: BitSubset<U>,
impl<T, U> BitTestNone for Difference<T, U>where
T: BitSubset<U>,
Source§impl<T, U, Y> BitUnion<Y> for Difference<T, U>
impl<T, U, Y> BitUnion<Y> for Difference<T, U>
Source§impl<T, U> BitUnset for Difference<T, U>
impl<T, U> BitUnset for Difference<T, U>
Source§impl<T, U> BitUnsetLimit for Difference<T, U>where
T: BitUnsetLimit,
U: BitSetLimit,
impl<T, U> BitUnsetLimit for Difference<T, U>where
T: BitUnsetLimit,
U: BitSetLimit,
Source§const MAX_UNSET_INDEX: usize
const MAX_UNSET_INDEX: usize
Largest possible bit index that can be unset.
Any larger index will always be set.
Unsetting larger index is now allowed. Read more
Source§impl<T: Clone, U: Clone> Clone for Difference<T, U>
impl<T: Clone, U: Clone> Clone for Difference<T, U>
Source§fn clone(&self) -> Difference<T, U>
fn clone(&self) -> Difference<T, U>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Default, U: Default> Default for Difference<T, U>
impl<T: Default, U: Default> Default for Difference<T, U>
Source§fn default() -> Difference<T, U>
fn default() -> Difference<T, U>
Returns the “default value” for a type. Read more
Source§impl<T, U> Display for Difference<T, U>
impl<T, U> Display for Difference<T, U>
impl<T: Copy, U: Copy> Copy for Difference<T, U>
impl<T: Eq, U: Eq> Eq for Difference<T, U>
impl<T, U> StructuralPartialEq for Difference<T, U>
Auto Trait Implementations§
impl<T, U> Freeze for Difference<T, U>
impl<T, U> RefUnwindSafe for Difference<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Difference<T, U>
impl<T, U> Sync for Difference<T, U>
impl<T, U> Unpin for Difference<T, U>
impl<T, U> UnwindSafe for Difference<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more