Struct IntoIter
pub struct IntoIter<T> { /* private fields */ }
Iterator over the bytes contained by the buffer.
Examples
Basic usage:
use Bytes;
let buf = from;
let mut iter = buf.into_iter;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Implementations
impl<T> IntoIter<T>
fn new(inner: T) -> IntoIter<T>Creates an iterator over the bytes contained by the buffer.
Examples
use Bytes; let buf = from_static; let mut iter = buf.into_iter; assert_eq!; assert_eq!; assert_eq!; assert_eq!;fn into_inner(self) -> TConsumes this
IntoIter, returning the underlying value.Examples
use ; let buf = from; let mut iter = buf.into_iter; assert_eq!; let buf = iter.into_inner; assert_eq!;fn get_ref(&self) -> &TGets a reference to the underlying
Buf.It is inadvisable to directly read from the underlying
Buf.Examples
use ; let buf = from; let mut iter = buf.into_iter; assert_eq!; assert_eq!;fn get_mut(&mut self) -> &mut TGets a mutable reference to the underlying
Buf.It is inadvisable to directly read from the underlying
Buf.Examples
use ; let buf = from; let mut iter = buf.into_iter; assert_eq!; iter.get_mut.advance; assert_eq!;
Trait Implementations
impl<T: Buf> ExactSizeIterator for IntoIter<T>
impl<T: Buf> Iterator for IntoIter<T>
type Item = u8;fn next(&mut self) -> Option<u8>fn size_hint(&self) -> (usize, Option<usize>)
impl<T: Debug> Debug for IntoIter<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<T> Freeze for IntoIter<T>
where
T: Freeze,
impl<T> RefUnwindSafe for IntoIter<T>
where
T: RefUnwindSafe,
impl<T> Send for IntoIter<T>
where
T: Send,
impl<T> Sync for IntoIter<T>
where
T: Sync,
impl<T> Unpin for IntoIter<T>
where
T: Unpin,
impl<T> UnsafeUnpin for IntoIter<T>
where
T: UnsafeUnpin,
impl<T> UnwindSafe for IntoIter<T>
where
T: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for IntoIter<T>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for IntoIter<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for IntoIter<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for IntoIter<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for IntoIter<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for IntoIter<T>
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 IntoIter<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for IntoIter<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>