Struct Skip
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct Skip<I> { pub(in ::iter::adapters::skip) iter: I, pub(in ::iter::adapters::skip) n: usize }
An iterator that skips over n elements of iter.
This struct is created by the skip method on Iterator. See its
documentation for more.
Fields
iter: In: usize
Implementations
impl<I> Skip<I>
const fn new(iter: I, n: usize) -> Skip<I>
Trait Implementations
impl<I> DoubleEndedIterator for Skip<I>
where
I: DoubleEndedIterator + ExactSizeIterator,
fn next_back(&mut self) -> Option<Self::Item>fn nth_back(&mut self, n: usize) -> Option<I::Item>fn try_rfold<Acc, Fold, R>(&mut self, init: Acc, fold: Fold) -> R where Self: Sized, Fold: FnMut(Acc, Self::Item) -> R, R: Try<Output = Acc>,fn rfold<AAA, FFF>(self, init: AAA, fold: FFF) -> AAA where FFF: FnMut(AAA, Self::Item) -> AAA,fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
impl<I> ExactSizeIterator for Skip<I>
where
I: ExactSizeIterator,
impl<I> FusedIterator for Skip<I>
where
I: FusedIterator,
impl<I> Iterator for Skip<I>
where
I: Iterator,
type Item = <I as Iterator>::Item;fn next(&mut self) -> Option<I::Item>fn nth(&mut self, n: usize) -> Option<I::Item>fn count(self) -> usizefn last(self) -> Option<I::Item>fn size_hint(&self) -> (usize, Option<usize>)fn try_fold<Acc, Fold, R>(&mut self, init: Acc, fold: Fold) -> R where Self: Sized, Fold: FnMut(Acc, Self::Item) -> R, R: Try<Output = Acc>,fn fold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc where Fold: FnMut(Acc, Self::Item) -> Acc,fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item where Self: TrustedRandomAccessNoCoerce,
impl<I> SourceIter for Skip<I>
where
I: SourceIter,
type Source = <I as SourceIter>::Source;unsafe fn as_inner(&mut self) -> &mut I::Source
impl<I> TrustedLen for Skip<I>
where
I: Iterator + TrustedRandomAccess,
impl<I> TrustedRandomAccess for Skip<I>
where
I: TrustedRandomAccess,
impl<I> TrustedRandomAccessNoCoerce for Skip<I>
where
I: TrustedRandomAccessNoCoerce,
const MAY_HAVE_SIDE_EFFECT: bool = I::MAY_HAVE_SIDE_EFFECT;
impl<I: Clone> Clone for Skip<I>
fn clone(&self) -> Skip<I>
impl<I: Debug> Debug for Skip<I>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<I: InPlaceIterable> InPlaceIterable for Skip<I>
const EXPAND_BY: Option<NonZero<usize>> = I::EXPAND_BY;const MERGE_BY: Option<NonZero<usize>> = I::MERGE_BY;
impl<I: TrustedFused> TrustedFused for Skip<I>
Auto Trait Implementations
impl<I> Freeze for Skip<I>
where
I: Freeze,
impl<I> RefUnwindSafe for Skip<I>
where
I: RefUnwindSafe,
impl<I> Send for Skip<I>
where
I: Send,
impl<I> Sync for Skip<I>
where
I: Sync,
impl<I> Unpin for Skip<I>
where
I: Unpin,
impl<I> UnsafeUnpin for Skip<I>
where
I: UnsafeUnpin,
impl<I> UnwindSafe for Skip<I>
where
I: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for Skip<I>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for Skip<I>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Skip<I>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Skip<I>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Skip<I>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Skip<I>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Skip<I>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Skip<I>
impl<T, U> Into<U> for Skip<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 Skip<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 Skip<I>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>