Struct BlockIter

Source
pub struct BlockIter<B> { /* private fields */ }
Expand description

Represents a view into the blocks of a set or combination of sets. An iterator over the elements can be obtained with into_iter().

Implementations§

Source§

impl<B> BlockIter<B>

Source

pub fn into_inner(self) -> B

Returns the iterator over raw blocks.

Source§

impl<B> BlockIter<B>
where B: ExactSizeIterator<Item = Block>,

Source

pub fn new(inner: B) -> Self

Creates new block iterator.

Source

pub fn collect<T>(self) -> T
where T: FromIterator<Id>,

Equivalent to self.into_iter().collect().

Source

pub fn into_set(self) -> IdSet

Collects the iterator into an IdSet.

Source

pub fn union<I>(self, other: I) -> BlockIter<Union<B, I::Blocks>>

Takes the union of the blocks with another block iterator. Equivalent to self | other.

Source

pub fn intersection<I>(self, other: I) -> BlockIter<Intersection<B, I::Blocks>>

Takes the intersection of the blocks with another block iterator. Equivalent to self & other.

Source

pub fn difference<I>(self, other: I) -> BlockIter<Difference<B, I::Blocks>>

Takes the difference of the blocks with another block iterator. Equivalent to self - other.

Source

pub fn symmetric_difference<I>( self, other: I, ) -> BlockIter<SymmetricDifference<B, I::Blocks>>

Takes the symmetric difference of the blocks with another block iterator. Equivalent to self ^ other.

Trait Implementations§

Source§

impl<B, I> BitAnd<I> for BlockIter<B>

Source§

fn bitand(self, other: I) -> Self::Output

Takes the intersection of two objects.

Source§

type Output = BlockIter<Intersection<B, <I as IntoBlockIterator>::Blocks>>

The resulting type after applying the & operator.
Source§

impl<B, I> BitOr<I> for BlockIter<B>

Source§

fn bitor(self, other: I) -> Self::Output

Takes the union of two objects.

Source§

type Output = BlockIter<Union<B, <I as IntoBlockIterator>::Blocks>>

The resulting type after applying the | operator.
Source§

impl<B, I> BitXor<I> for BlockIter<B>

Source§

fn bitxor(self, other: I) -> Self::Output

Takes the symmetric difference of two objects.

Source§

type Output = BlockIter<SymmetricDifference<B, <I as IntoBlockIterator>::Blocks>>

The resulting type after applying the ^ operator.
Source§

impl<B: Clone> Clone for BlockIter<B>

Source§

fn clone(&self) -> BlockIter<B>

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<B: Debug> Debug for BlockIter<B>

Source§

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

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

impl<B> IntoBlockIterator for BlockIter<B>
where B: ExactSizeIterator<Item = Block>,

Source§

type Blocks = B

The raw iterator type.
Source§

fn into_block_iter(self) -> BlockIter<Self::Blocks>

Creates a block iterator.
Source§

impl<B> IntoIterator for BlockIter<B>
where B: ExactSizeIterator<Item = Block>,

Source§

type Item = usize

The type of the elements being iterated over.
Source§

type IntoIter = IdIter<B>

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<B, I> Sub<I> for BlockIter<B>

Source§

fn sub(self, other: I) -> Self::Output

Takes the difference of two objects.

Source§

type Output = BlockIter<Difference<B, <I as IntoBlockIterator>::Blocks>>

The resulting type after applying the - operator.

Auto Trait Implementations§

§

impl<B> Freeze for BlockIter<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for BlockIter<B>
where B: RefUnwindSafe,

§

impl<B> Send for BlockIter<B>
where B: Send,

§

impl<B> Sync for BlockIter<B>
where B: Sync,

§

impl<B> Unpin for BlockIter<B>
where B: Unpin,

§

impl<B> UnwindSafe for BlockIter<B>
where B: 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.