pub struct Take<R> { /* private fields */ }Expand description
Reader adapter which limits the bytes read from an underlying reader.
Created by calling [Read::take].
Implementations§
Trait Implementations§
Source§impl<R: Read> Read for Take<R>
impl<R: Read> Read for Take<R>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Reads bytes from source into
buf. Read moreSource§fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Reads bytes from source until
buf is full. Read moreAuto Trait Implementations§
impl<R> Freeze for Take<R>where
R: Freeze,
impl<R> RefUnwindSafe for Take<R>where
R: RefUnwindSafe,
impl<R> Send for Take<R>where
R: Send,
impl<R> Sync for Take<R>where
R: Sync,
impl<R> Unpin for Take<R>where
R: Unpin,
impl<R> UnwindSafe for Take<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more