Struct Apply

Source
pub struct Apply<Op, S1, S2> { /* private fields */ }
Expand description

Binary operation application, as lazy bitset.

Created by apply, or by applying BitOr, BitAnd, BitXor, Sub operations on BitSetInterfaces.

Implementations§

Source§

impl<Op, S1, S2> Apply<Op, S1, S2>
where Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source

pub fn block_iter<'a>(&'a self) -> BlockIter<&'a Self>

Source

pub fn iter<'a>(&'a self) -> IndexIter<&'a Self>

Source

pub fn contains(&self, index: usize) -> bool

Source

pub fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl<Op, S1, S2, Rhs> BitAnd<Rhs> for &Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn bitand(self, rhs: Rhs) -> Self::Output

Returns intersection of self and rhs bitsets.

Source§

type Output = Apply<And, &Apply<Op, S1, S2>, Rhs>

The resulting type after applying the & operator.
Source§

impl<Op, S1, S2, Rhs> BitAnd<Rhs> for Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn bitand(self, rhs: Rhs) -> Self::Output

Returns intersection of self and rhs bitsets.

Source§

type Output = Apply<And, Apply<Op, S1, S2>, Rhs>

The resulting type after applying the & operator.
Source§

impl<Op, S1, S2, Rhs> BitOr<Rhs> for &Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn bitor(self, rhs: Rhs) -> Self::Output

Returns union of self and rhs bitsets.

Source§

type Output = Apply<Or, &Apply<Op, S1, S2>, Rhs>

The resulting type after applying the | operator.
Source§

impl<Op, S1, S2, Rhs> BitOr<Rhs> for Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn bitor(self, rhs: Rhs) -> Self::Output

Returns union of self and rhs bitsets.

Source§

type Output = Apply<Or, Apply<Op, S1, S2>, Rhs>

The resulting type after applying the | operator.
Source§

impl<Op, S1, S2> BitSetBase for Apply<Op, S1, S2>
where Op: BitSetOp, S1: LevelMasks, S2: LevelMasks<Conf = S1::Conf>,

Source§

const TRUSTED_HIERARCHY: bool

true if S1, S2 and Op are TrustedHierarchy.

Source§

type Conf = <S1 as BitSetBase>::Conf

Source§

impl<Op, S1, S2> BitSetInterface for &Apply<Op, S1, S2>
where Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn block_iter(&self) -> BlockIter<&Self>

Source§

fn iter(&self) -> IndexIter<&Self>

Source§

fn into_block_iter(self) -> BlockIter<Self>

Source§

fn contains(&self, index: usize) -> bool

Source§

fn is_empty(&self) -> bool

O(1) if TRUSTED_HIERARCHY, O(N) otherwise.
Source§

impl<Op, S1, S2> BitSetInterface for Apply<Op, S1, S2>
where Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn block_iter(&self) -> BlockIter<&Self>

Source§

fn iter(&self) -> IndexIter<&Self>

Source§

fn into_block_iter(self) -> BlockIter<Self>

Source§

fn contains(&self, index: usize) -> bool

Source§

fn is_empty(&self) -> bool

O(1) if TRUSTED_HIERARCHY, O(N) otherwise.
Source§

impl<Op, S1, S2, Rhs> BitXor<Rhs> for &Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn bitxor(self, rhs: Rhs) -> Self::Output

Returns symmetric difference of self and rhs bitsets.

Source§

type Output = Apply<Xor, &Apply<Op, S1, S2>, Rhs>

The resulting type after applying the ^ operator.
Source§

impl<Op, S1, S2, Rhs> BitXor<Rhs> for Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn bitxor(self, rhs: Rhs) -> Self::Output

Returns symmetric difference of self and rhs bitsets.

Source§

type Output = Apply<Xor, Apply<Op, S1, S2>, Rhs>

The resulting type after applying the ^ operator.
Source§

impl<Op: Clone, S1: Clone, S2: Clone> Clone for Apply<Op, S1, S2>

Source§

fn clone(&self) -> Apply<Op, S1, S2>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Op, S1, S2> Debug for Apply<Op, S1, S2>
where Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Op, S1, S2> IntoIterator for &Apply<Op, S1, S2>
where Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

type Item = usize

The type of the elements being iterated over.
Source§

type IntoIter = IndexIter<&Apply<Op, S1, S2>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<Op, S1, S2> IntoIterator for Apply<Op, S1, S2>
where Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

type Item = usize

The type of the elements being iterated over.
Source§

type IntoIter = IndexIter<Apply<Op, S1, S2>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<Op, S1, S2, Rhs> PartialEq<Rhs> for Apply<Op, S1, S2>
where Rhs: LevelMasksIterExt<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn eq(&self, other: &Rhs) -> bool

Works faster with TRUSTED_HIERARCHY.

1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Op, S1, S2, Rhs> Sub<Rhs> for &Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn sub(self, rhs: Rhs) -> Self::Output

Returns difference of self and rhs bitsets.

Or relative complement of rhs in self.

Source§

type Output = Apply<Sub, &Apply<Op, S1, S2>, Rhs>

The resulting type after applying the - operator.
Source§

impl<Op, S1, S2, Rhs> Sub<Rhs> for Apply<Op, S1, S2>
where Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>, Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Source§

fn sub(self, rhs: Rhs) -> Self::Output

Returns difference of self and rhs bitsets.

Or relative complement of rhs in self.

Source§

type Output = Apply<Sub, Apply<Op, S1, S2>, Rhs>

The resulting type after applying the - operator.
Source§

impl<Op, S1, S2> Eq for Apply<Op, S1, S2>
where Op: BitSetOp, S1: BitSetInterface, S2: BitSetInterface<Conf = S1::Conf>,

Auto Trait Implementations§

§

impl<Op, S1, S2> Freeze for Apply<Op, S1, S2>
where S1: Freeze, S2: Freeze,

§

impl<Op, S1, S2> RefUnwindSafe for Apply<Op, S1, S2>

§

impl<Op, S1, S2> Send for Apply<Op, S1, S2>
where S1: Send, S2: Send, Op: Send,

§

impl<Op, S1, S2> Sync for Apply<Op, S1, S2>
where S1: Sync, S2: Sync, Op: Sync,

§

impl<Op, S1, S2> Unpin for Apply<Op, S1, S2>
where S1: Unpin, S2: Unpin, Op: Unpin,

§

impl<Op, S1, S2> UnwindSafe for Apply<Op, S1, S2>
where S1: UnwindSafe, S2: UnwindSafe, Op: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.