Struct Bytes

struct Bytes<'a> { ... }

An iterator over the bytes in a byte string.

'a is the lifetime of the byte string being traversed.

Implementations

impl<'a> Bytes<'a>

fn as_bytes(self: &Self) -> &'a [u8]

Views the remaining underlying data as a subslice of the original data. This has the same lifetime as the original slice, and so the iterator can continue to be used while this exists.

impl<'a> Clone for Bytes<'a>

fn clone(self: &Self) -> Bytes<'a>

impl<'a> Debug for Bytes<'a>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<'a> DoubleEndedIterator for Bytes<'a>

fn next_back(self: &mut Self) -> Option<u8>

impl<'a> ExactSizeIterator for Bytes<'a>

fn len(self: &Self) -> usize

impl<'a> Freeze for Bytes<'a>

impl<'a> FusedIterator for Bytes<'a>

impl<'a> Iterator for Bytes<'a>

fn next(self: &mut Self) -> Option<u8>
fn size_hint(self: &Self) -> (usize, Option<usize>)

impl<'a> RefUnwindSafe for Bytes<'a>

impl<'a> Send for Bytes<'a>

impl<'a> Sync for Bytes<'a>

impl<'a> Unpin for Bytes<'a>

impl<'a> UnsafeUnpin for Bytes<'a>

impl<'a> UnwindSafe for Bytes<'a>

impl<I> IntoIterator for Bytes<'a>

fn into_iter(self: Self) -> I

impl<T> Any for Bytes<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Bytes<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Bytes<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Bytes<'a>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Bytes<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Bytes<'a>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Bytes<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Bytes<'a>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Bytes<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>