Struct MergeIterInner
pub(in ::collections::btree) struct MergeIterInner<I: Iterator> { pub(in ::collections::btree::merge_iter) a: I, pub(in ::collections::btree::merge_iter) b: I, pub(in ::collections::btree::merge_iter) peeked: Option<Peeked<I>> }
Core of an iterator that merges the output of two strictly ascending iterators, for instance a union or a symmetric difference.
Fields
a: Ib: Ipeeked: Option<Peeked<I>>
Implementations
impl<I: Iterator> MergeIterInner<I>
fn new(a: I, b: I) -> SelfCreates a new core for an iterator merging a pair of sources.
fn nexts<Cmp: Fn(&I::Item, &I::Item) -> Ordering>(&mut self, cmp: Cmp) -> (Option<I::Item>, Option<I::Item>) where I: FusedIterator,Returns the next pair of items stemming from the pair of sources being merged. If both returned options contain a value, that value is equal and occurs in both sources. If one of the returned options contains a value, that value doesn't occur in the other source (or the sources are not strictly ascending). If neither returned option contains a value, iteration has finished and subsequent calls will return the same empty pair.
fn lens(&self) -> (usize, usize) where I: ExactSizeIterator,Returns a pair of upper bounds for the
size_hintof the final iterator.
Trait Implementations
impl<I> Clone for MergeIterInner<I>
where
I: Clone + Iterator,
I::Item: Clone,
fn clone(&self) -> Self
impl<I> Debug for MergeIterInner<I>
where
I: Debug + Iterator,
I::Item: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<I> Freeze for MergeIterInner<I>
where
I: Freeze + Freeze,
Option<Peeked<I>>: Freeze,
impl<I> RefUnwindSafe for MergeIterInner<I>
where
I: RefUnwindSafe + RefUnwindSafe,
Option<Peeked<I>>: RefUnwindSafe,
impl<I> Send for MergeIterInner<I>
where
I: Send + Send,
Option<Peeked<I>>: Send,
impl<I> Sync for MergeIterInner<I>
where
I: Sync + Sync,
Option<Peeked<I>>: Sync,
impl<I> Unpin for MergeIterInner<I>
where
I: Unpin + Unpin,
Option<Peeked<I>>: Unpin,
impl<I> UnsafeUnpin for MergeIterInner<I>
where
I: UnsafeUnpin + UnsafeUnpin,
Option<Peeked<I>>: UnsafeUnpin,
impl<I> UnwindSafe for MergeIterInner<I>
where
I: UnwindSafe + UnwindSafe,
Option<Peeked<I>>: UnwindSafe,
Blanket Implementations
impl<T> Any for MergeIterInner<I>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for MergeIterInner<I>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for MergeIterInner<I>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for MergeIterInner<I>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for MergeIterInner<I>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for MergeIterInner<I>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for MergeIterInner<I>
impl<T> ToOwned for MergeIterInner<I>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for MergeIterInner<I>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for MergeIterInner<I>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for MergeIterInner<I>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>