pub struct Read { /* private fields */ }
Expand description
I/O-free coroutine for reading bytes into a buffer.
Implementations§
Source§impl Read
impl Read
Sourcepub const DEFAULT_CAPACITY: usize = 8_192usize
pub const DEFAULT_CAPACITY: usize = 8_192usize
The default read buffer capacity.
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new coroutine to read bytes using a buffer with
Self::DEFAULT_CAPACITY
capacity.
See Self::with_capacity
for a custom buffer capacity.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new coroutine to read bytes using a buffer with the given capacity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Read
impl RefUnwindSafe for Read
impl Send for Read
impl Sync for Read
impl Unpin for Read
impl UnwindSafe for Read
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