1.0.0[][src]Struct nom::lib::std::vec::IntoIter

pub struct IntoIter<T, A = Global> where
    A: AllocRef
{ /* fields omitted */ }

An iterator that moves out of a vector.

This struct is created by the into_iter method on Vec (provided by the IntoIterator trait).

Example

let v = vec![0, 1, 2];
let iter: std::vec::IntoIter<_> = v.into_iter();

Implementations

impl<T, A> IntoIter<T, A> where
    A: AllocRef
[src]

pub fn as_slice(&self) -> &[T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
1.15.0[src]

Returns the remaining items of this iterator as a slice.

Examples

let vec = vec!['a', 'b', 'c'];
let mut into_iter = vec.into_iter();
assert_eq!(into_iter.as_slice(), &['a', 'b', 'c']);
let _ = into_iter.next().unwrap();
assert_eq!(into_iter.as_slice(), &['b', 'c']);

pub fn as_mut_slice(&mut self) -> &mut [T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
1.15.0[src]

Returns the remaining items of this iterator as a mutable slice.

Examples

let vec = vec!['a', 'b', 'c'];
let mut into_iter = vec.into_iter();
assert_eq!(into_iter.as_slice(), &['a', 'b', 'c']);
into_iter.as_mut_slice()[2] = 'z';
assert_eq!(into_iter.next().unwrap(), 'a');
assert_eq!(into_iter.next().unwrap(), 'b');
assert_eq!(into_iter.next().unwrap(), 'z');

pub fn alloc_ref(&self) -> &A

Notable traits for &'_ mut I

impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
[src]

🔬 This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

Trait Implementations

impl<T, A> AsRef<[T]> for IntoIter<T, A> where
    A: AllocRef
1.46.0[src]

impl<T, A> Clone for IntoIter<T, A> where
    A: Clone + AllocRef,
    T: Clone
1.8.0[src]

impl<T, A> Debug for IntoIter<T, A> where
    A: AllocRef,
    T: Debug
1.13.0[src]

impl<T, A> DoubleEndedIterator for IntoIter<T, A> where
    A: AllocRef
[src]

impl<T, A> Drop for IntoIter<T, A> where
    A: AllocRef
[src]

impl<T, A> ExactSizeIterator for IntoIter<T, A> where
    A: AllocRef
[src]

impl<T, A> FusedIterator for IntoIter<T, A> where
    A: AllocRef
1.26.0[src]

impl<T, A> InPlaceIterable for IntoIter<T, A> where
    A: AllocRef
[src]

impl<T, A> Iterator for IntoIter<T, A> where
    A: AllocRef
[src]

type Item = T

The type of the elements being iterated over.

impl<T, A> Send for IntoIter<T, A> where
    A: Send + AllocRef,
    T: Send
[src]

impl<T, A> SourceIter for IntoIter<T, A> where
    A: AllocRef
[src]

type Source = IntoIter<T, A>

🔬 This is a nightly-only experimental API. (inplace_iteration)

A source stage in an iterator pipeline.

impl<T, A> Sync for IntoIter<T, A> where
    A: AllocRef,
    T: Sync
[src]

impl<T, A> TrustedLen for IntoIter<T, A> where
    A: AllocRef
[src]

Auto Trait Implementations

impl<T, A> RefUnwindSafe for IntoIter<T, A> where
    A: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, A> Unpin for IntoIter<T, A> where
    A: Unpin,
    T: Unpin

impl<T, A> UnwindSafe for IntoIter<T, A> where
    A: UnwindSafe,
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<A, T> AsBits<T> for A where
    A: AsRef<[T]>,
    T: BitStore + BitRegister
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.