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§

source

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 TcpStream

Implement ReadReady for std::net::TcpStream.

source§

impl ReadReady for File

source§

impl<R: Read + ReadReady> ReadReady for BufReader<R>

Implement ReadReady for std::io::BufReader<R>.

source§

impl<T: ReadReady, U> ReadReady for Chain<T, U>

Implement ReadReady for std::io::Chain<T, U>.

source§

impl<'a> ReadReady for StdinLock<'a>

Implement ReadReady for StdinLock.

source§

impl<R: ReadReady> ReadReady for Box<R>

Implement ReadReady for Box.

source§

impl ReadReady for Stdin

Implement ReadReady for Stdin.

source§

impl ReadReady for ChildStderr

source§

impl ReadReady for Repeat

Implement ReadReady for std::io::Repeat.

source§

impl ReadReady for UnixStream

Implement ReadReady for std::os::unix::net::UnixStream.

source§

impl<T: ReadReady> ReadReady for Take<T>

Implement ReadReady for std::io::Take<T>.

source§

impl ReadReady for Empty

Implement ReadReady for std::io::Empty.

source§

impl<T: AsRef<[u8]>> ReadReady for Cursor<T>

Implement ReadReady for std::io::Cursor<T>.

source§

impl<T> ReadReady for VecDeque<T>

Implement ReadReady for std::collections::VecDeque<T>.

source§

impl ReadReady for ChildStdout

source§

impl ReadReady for &[u8]

Implement ReadReady for &[u8].

Implementors§