pub trait Io:
Read
+ Write
+ Send {
// Required methods
fn bound_reads(&mut self, timeout: Duration) -> Result<()>;
fn bound_writes(&mut self, timeout: Duration) -> Result<()>;
// Provided method
fn reopens(&self) -> bool { ... }
}Expand description
The device side of a port: a PTY master or the TCP peer.
Required Methods§
Sourcefn bound_reads(&mut self, timeout: Duration) -> Result<()>
fn bound_reads(&mut self, timeout: Duration) -> Result<()>
Bound every read by timeout: it ends with TimedOut or WouldBlock.
Sourcefn bound_writes(&mut self, timeout: Duration) -> Result<()>
fn bound_writes(&mut self, timeout: Duration) -> Result<()>
The same for writes.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".