pub struct StdinLock<'a> { /* private fields */ }
Expand description
A locked reference to the Stdin
handle.
Trait Implementations§
source§impl BufRead for StdinLock<'_>
impl BufRead for StdinLock<'_>
source§fn fill_buf(&mut self) -> Result<&[u8]>
fn fill_buf(&mut self) -> Result<&[u8]>
Returns the contents of the internal buffer, filling it with more data
from the inner reader if it is empty.
source§fn consume(&mut self, n: usize)
fn consume(&mut self, n: usize)
Tells this buffer that
amt
bytes have been consumed from the buffer,
so they should no longer be returned in calls to read
.source§fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
Available on crate feature
alloc
only.Read all bytes into
buf
until the delimiter byte
or EOF is reached.source§impl Read for StdinLock<'_>
impl Read for StdinLock<'_>
source§fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read.
source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, AxError>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, AxError>
Available on crate feature
alloc
only.Read all bytes until EOF in this source, placing them into
buf
.source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, AxError>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, AxError>
Available on crate feature
alloc
only.Read all bytes until EOF in this source, appending them to
buf
.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for StdinLock<'a>
impl<'a> !Send for StdinLock<'a>
impl<'a> !Sync for StdinLock<'a>
impl<'a> Unpin for StdinLock<'a>
impl<'a> !UnwindSafe for StdinLock<'a>
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