pub trait ReadReady {
    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§

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§

Implement ReadReady for Stdin.

Implement ReadReady for StdinLock.

Implement ReadReady for std::net::TcpStream.

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

Implement ReadReady for &[u8].

Implement ReadReady for std::io::Empty.

Implement ReadReady for std::io::Repeat.

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

Implement ReadReady for Box.

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

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

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

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

Implementors§