Struct bitvec::vec::IntoIter[][src]

pub struct IntoIter<O, T> where
    O: 'static + BitOrder,
    T: 'static + BitStore
{ /* fields omitted */ }

An iterator that moves out of a vector.

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

Original

vec::IntoIter

API Differences

This explicitly requires that O and T type parameters are 'static, which is not a bound present in the original. However, it is always true, so it will not cause a compilation error.

Implementations

impl<O, T> IntoIter<O, T> where
    O: BitOrder,
    T: BitStore
[src]

pub fn as_bitslice(&self) -> &BitSlice<O, T>

Notable traits for &'a BitSlice<O, T>

impl<'a, O, T> Read for &'a BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField
impl<'a, O, T> Write for &'a mut BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T::Alias>: BitField
[src]

Returns the remaining bits of this iterator as a bitslice.

Original

vec::IntoIter::as_slice

Examples

use bitvec::prelude::*;

let bv = bitvec![0, 1, 0, 1];
let mut into_iter = bv.into_iter();
assert_eq!(into_iter.as_bitslice(), bits![0, 1, 0, 1]);
let _ = into_iter.next().unwrap();
assert_eq!(into_iter.as_bitslice(), bits![1, 0, 1]);

pub fn as_mut_bitslice(&mut self) -> &mut BitSlice<O, T>

Notable traits for &'a BitSlice<O, T>

impl<'a, O, T> Read for &'a BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField
impl<'a, O, T> Write for &'a mut BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T::Alias>: BitField
[src]

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

Original

vec::IntoIter::as_mut_slice

Examples

use bitvec::prelude::*;

let bv = bitvec![0, 1, 0, 1];
let mut into_iter = bv.into_iter();
assert_eq!(into_iter.as_bitslice(), bits![0, 1, 0, 1]);
into_iter.as_mut_bitslice().set(2, true);
assert!(!into_iter.next().unwrap());
assert!(into_iter.next().unwrap());
assert!(into_iter.next().unwrap());

Trait Implementations

impl<O: Clone, T: Clone> Clone for IntoIter<O, T> where
    O: 'static + BitOrder,
    T: 'static + BitStore
[src]

impl<O: Debug, T: Debug> Debug for IntoIter<O, T> where
    O: 'static + BitOrder,
    T: 'static + BitStore
[src]

impl<O, T> DoubleEndedIterator for IntoIter<O, T> where
    O: BitOrder,
    T: BitStore
[src]

impl<O, T> ExactSizeIterator for IntoIter<O, T> where
    O: BitOrder,
    T: BitStore
[src]

impl<O, T> FusedIterator for IntoIter<O, T> where
    O: BitOrder,
    T: BitStore
[src]

impl<O, T> Iterator for IntoIter<O, T> where
    O: BitOrder,
    T: BitStore
[src]

type Item = bool

The type of the elements being iterated over.

Auto Trait Implementations

impl<O, T> RefUnwindSafe for IntoIter<O, T> where
    O: RefUnwindSafe,
    T: RefUnwindSafe,
    <T as BitStore>::Mem: RefUnwindSafe

impl<O, T> Send for IntoIter<O, T>

impl<O, T> Sync for IntoIter<O, T>

impl<O, T> Unpin for IntoIter<O, T>

impl<O, T> UnwindSafe for IntoIter<O, T> where
    O: RefUnwindSafe,
    T: RefUnwindSafe,
    <T as BitStore>::Mem: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[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[src]

impl<T> Conv for T[src]

impl<T> FmtForward for T[src]

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
[src]

impl<T> Pipe for T[src]

impl<T> PipeAsRef for T[src]

impl<T> PipeBorrow for T[src]

impl<T> PipeDeref for T[src]

impl<T> PipeRef for T[src]

impl<T> Tap for T[src]

impl<T> Tap for T[src]

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

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

impl<T> TapDeref for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T[src]

impl<T> TryConv for T[src]

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.