pub trait StreamWait {
// Required methods
fn id(&self) -> usize;
fn wait(&self, need: usize) -> bool;
fn closed(&self) -> bool;
}Expand description
Wait on a stream.
For ReadStream, wait until there’s enough to read. For WriteStream, wait until there’s enough to write something.