Struct MultiIntersection

Source
pub struct MultiIntersection<S>
where S: SkippingSearch,
{ /* private fields */ }
Expand description

Combines an arbitrary number of SkippingSearch objects, and returns only the items present in all of them.

Implementations§

Source§

impl<S> MultiIntersection<S>
where S: SkippingSearch,

Source

pub fn new(sub_searches: Vec<S>) -> Self

Assembles a multi-intersection out of other SkippingSearch objects.

§Panics

Will panic if sub_searches.len() == 0

Trait Implementations§

Source§

impl<S> SkippingSearch for MultiIntersection<S>
where S: SkippingSearch,

Source§

type Item = <S as SkippingSearch>::Item

Source§

fn suggest_next(&self) -> Option<Self::Item>

Returns the smallest value for which find_and_advance may return true. For efficiency reasons, making sure the value is one for which find_and_advance will return true is preferred, when possible.
Source§

fn find_and_advance(&mut self, item: &Self::Item) -> bool

Returns whether this contains the passed-in value. Also mutates the receiver to forget about any values smaller than or equal to the item.
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns a lower/upper bound on the number of values that can be obtained by using self.find_and_advance(self.suggest_next()) repeatedly. (0, None) is a valid, minimally constraining answer. (n, Some(n)) is a maximally constraining answer.

Auto Trait Implementations§

§

impl<S> Freeze for MultiIntersection<S>

§

impl<S> RefUnwindSafe for MultiIntersection<S>
where S: RefUnwindSafe,

§

impl<S> Send for MultiIntersection<S>
where S: Send,

§

impl<S> Sync for MultiIntersection<S>
where S: Sync,

§

impl<S> Unpin for MultiIntersection<S>
where S: Unpin,

§

impl<S> UnwindSafe for MultiIntersection<S>
where S: 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> 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, 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.