Struct Bytes
pub struct Bytes<'a> { /* private fields */ }
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) -> &'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.
Trait Implementations
impl<'a> Clone for Bytes<'a>
fn clone(&self) -> Self
impl<'a> Debug for Bytes<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> DoubleEndedIterator for Bytes<'a>
fn next_back(&mut self) -> Option<u8>
impl<'a> ExactSizeIterator for Bytes<'a>
fn len(&self) -> usize
impl<'a> FusedIterator for Bytes<'a>
impl<'a> Iterator for Bytes<'a>
type Item = u8;fn next(&mut self) -> Option<u8>fn size_hint(&self) -> (usize, Option<usize>)
Auto Trait Implementations
impl<'a> Freeze for Bytes<'a>
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>
Blanket Implementations
impl<I> IntoIterator for Bytes<'a>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for Bytes<'a>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Bytes<'a>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Bytes<'a>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Bytes<'a>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Bytes<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Bytes<'a>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Bytes<'a>
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 Bytes<'a>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Bytes<'a>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>