Struct GenericShunt
pub(crate) struct GenericShunt<'a, I, R> { pub(in ::iter::adapters) iter: I, pub(in ::iter::adapters) residual: &'a mut Option<R> }
An iterator adapter that produces output as long as the underlying
iterator produces values where Try::branch says to ControlFlow::Continue.
If a ControlFlow::Break is encountered, the iterator stops and the
residual is stored.
Fields
iter: Iresidual: &'a mut Option<R>
Trait Implementations
impl<I, R> InPlaceIterable for GenericShunt<'_, I, R>
where
I: InPlaceIterable,
const EXPAND_BY: Option<NonZero<usize>> = I::EXPAND_BY;const MERGE_BY: Option<NonZero<usize>> = I::MERGE_BY;
impl<I, R> Iterator for GenericShunt<'_, I, R>
where
I: Iterator<Item: Try<Residual = R>>,
type Item = <<I as Iterator>::Item as Try>::Output;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)fn try_fold<B, F, T>(&mut self, init: B, f: F) -> T where F: FnMut(B, Self::Item) -> T, T: Try<Output = B>,fn fold<AAA, FFF>(self, init: AAA, fold: FFF) -> AAA where FFF: FnMut(AAA, Self::Item) -> AAA,
impl<I, R> SourceIter for GenericShunt<'_, I, R>
where
I: SourceIter,
type Source = <I as SourceIter>::Source;unsafe fn as_inner(&mut self) -> &mut Self::Source
Auto Trait Implementations
impl<'a, I, R> !UnwindSafe for GenericShunt<'a, I, R>
impl<'a, I, R> Freeze for GenericShunt<'a, I, R>
where
I: Freeze,
&'a mut Option<R>: Freeze,
impl<'a, I, R> RefUnwindSafe for GenericShunt<'a, I, R>
where
I: RefUnwindSafe,
&'a mut Option<R>: RefUnwindSafe,
impl<'a, I, R> Send for GenericShunt<'a, I, R>
where
I: Send,
&'a mut Option<R>: Send,
impl<'a, I, R> Sync for GenericShunt<'a, I, R>
where
I: Sync,
&'a mut Option<R>: Sync,
impl<'a, I, R> Unpin for GenericShunt<'a, I, R>
where
I: Unpin,
&'a mut Option<R>: Unpin,
impl<'a, I, R> UnsafeUnpin for GenericShunt<'a, I, R>
where
I: UnsafeUnpin,
&'a mut Option<R>: UnsafeUnpin,
Blanket Implementations
impl<I> IntoIterator for GenericShunt<'a, I, R>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for GenericShunt<'a, I, R>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for GenericShunt<'a, I, R>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for GenericShunt<'a, I, R>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for GenericShunt<'a, I, R>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for GenericShunt<'a, I, R>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for GenericShunt<'a, I, R>
impl<T, U> Into<U> for GenericShunt<'a, I, R>
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 GenericShunt<'a, I, R>
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 GenericShunt<'a, I, R>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>