Trait system_interface::io::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§
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 TcpStream
impl ReadReady for TcpStream
Implement ReadReady
for std::net::TcpStream
.
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<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>
.
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: 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 ReadReady for Stdin
impl ReadReady for Stdin
Implement ReadReady
for Stdin
.
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 Repeat
impl ReadReady for Repeat
Implement ReadReady
for std::io::Repeat
.
fn num_ready_bytes(&self) -> Result<u64>
source§impl ReadReady for UnixStream
impl ReadReady for UnixStream
Implement ReadReady
for std::os::unix::net::UnixStream
.
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 ReadReady for Empty
impl ReadReady for Empty
Implement ReadReady
for std::io::Empty
.
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 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 ReadReady for ChildStdout
impl ReadReady for ChildStdout
fn num_ready_bytes(&self) -> Result<u64>
source§impl ReadReady for &[u8]
impl ReadReady for &[u8]
Implement ReadReady
for &[u8]
.