Struct Bytes

pub struct Bytes<R> { pub(in ::io::util) inner: R }

An iterator over u8 values of a reader.

This struct is generally created by calling bytes on a reader. Please see the documentation of bytes for more details.

Fields

inner: R

Trait Implementations

impl<R: Debug> Debug for Bytes<R>

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

impl<R: Read> Iterator for Bytes<R>

type Item = Result<u8, Error>;
fn next(&mut self) -> Option<Result<u8>>
fn size_hint(&self) -> (usize, Option<usize>)

Auto Trait Implementations

impl<R> Freeze for Bytes<R> where R: Freeze,

impl<R> RefUnwindSafe for Bytes<R> where R: RefUnwindSafe,

impl<R> Send for Bytes<R> where R: Send,

impl<R> Sync for Bytes<R> where R: Sync,

impl<R> Unpin for Bytes<R> where R: Unpin,

impl<R> UnsafeUnpin for Bytes<R> where R: UnsafeUnpin,

impl<R> UnwindSafe for Bytes<R> where R: UnwindSafe,

Blanket Implementations

impl<I> IntoIterator for Bytes<R> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<T> Any for Bytes<R> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Bytes<R> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Bytes<R> where T: ?Sized,

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

impl<T> From<T> for Bytes<R>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Bytes<R> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Bytes<R>

impl<T, U> Into<U> for Bytes<R> where U: From<T>,

fn into(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<U> for Bytes<R> where U: Into<T>,

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

impl<T, U> TryInto<U> for Bytes<R> where U: TryFrom<T>,

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