system_interface::io

Trait ReadReady

Source
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 &[u8]

Implement ReadReady for &[u8].

Source§

impl ReadReady for File

Source§

impl ReadReady for Stdin

Implement ReadReady for Stdin.

Source§

impl ReadReady for Empty

Implement ReadReady for std::io::Empty.

Source§

impl ReadReady for Repeat

Implement ReadReady for std::io::Repeat.

Source§

impl ReadReady for TcpStream

Implement ReadReady for std::net::TcpStream.

Source§

impl ReadReady for UnixStream

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

Source§

impl ReadReady for ChildStderr

Source§

impl ReadReady for ChildStdout

Source§

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

Implement ReadReady for StdinLock.

Source§

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

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

Source§

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

Implement ReadReady for Box.

Source§

impl<T> ReadReady for VecDeque<T>

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

Source§

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

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

Source§

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

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

Source§

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

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

Implementors§