pub trait ReadReady {
// Required method
fn num_ready_bytes(&self) -> Result<u64>;
}
Expand description
Extension for readable streams that can indicate the number of bytes ready to be read immediately.
Required Methods§
Sourcefn num_ready_bytes(&self) -> Result<u64>
fn num_ready_bytes(&self) -> Result<u64>
Return the number of bytes which are ready to be read immediately.
The returned number may be greater than the number of bytes actually readable if the end of the stream is known to be reachable without blocking.
Implementations on Foreign Types§
Source§impl ReadReady for &[u8]
impl ReadReady for &[u8]
Implement ReadReady
for &[u8]
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl ReadReady for Stdin
impl ReadReady for Stdin
Implement ReadReady
for Stdin
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl ReadReady for Empty
impl ReadReady for Empty
Implement ReadReady
for std::io::Empty
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl ReadReady for Repeat
impl ReadReady for Repeat
Implement ReadReady
for std::io::Repeat
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl ReadReady for TcpStream
impl ReadReady for TcpStream
Implement ReadReady
for std::net::TcpStream
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl ReadReady for ChildStderr
impl ReadReady for ChildStderr
fn num_ready_bytes(&self) -> Result<u64>
Source§impl ReadReady for ChildStdout
impl ReadReady for ChildStdout
fn num_ready_bytes(&self) -> Result<u64>
Source§impl<'a> ReadReady for StdinLock<'a>
impl<'a> ReadReady for StdinLock<'a>
Implement ReadReady
for StdinLock
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl<R: Read + ReadReady> ReadReady for BufReader<R>
impl<R: Read + ReadReady> ReadReady for BufReader<R>
Implement ReadReady
for std::io::BufReader<R>
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl<R: ReadReady> ReadReady for Box<R>
impl<R: ReadReady> ReadReady for Box<R>
Implement ReadReady
for Box
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl<T> ReadReady for VecDeque<T>
impl<T> ReadReady for VecDeque<T>
Implement ReadReady
for std::collections::VecDeque<T>
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl<T: AsRef<[u8]>> ReadReady for Cursor<T>
impl<T: AsRef<[u8]>> ReadReady for Cursor<T>
Implement ReadReady
for std::io::Cursor<T>
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl<T: ReadReady> ReadReady for Take<T>
impl<T: ReadReady> ReadReady for Take<T>
Implement ReadReady
for std::io::Take<T>
.
fn num_ready_bytes(&self) -> Result<u64>
Source§impl<T: ReadReady, U> ReadReady for Chain<T, U>
impl<T: ReadReady, U> ReadReady for Chain<T, U>
Implement ReadReady
for std::io::Chain<T, U>
.