Trait StreamBase

Source
pub trait StreamBase<'a>: X11rbStream {
    type Readable: Future<Output = Result<()>> + Send + 'a;
    type Writable: Future<Output = Result<()>> + Send + 'a;

    // Required methods
    fn readable(&'a self) -> Self::Readable;
    fn writable(&'a self) -> Self::Writable;
}
Expand description

A stream that bytes can be read from or written to.

Required Associated Types§

Source

type Readable: Future<Output = Result<()>> + Send + 'a

The future returned by readable.

Source

type Writable: Future<Output = Result<()>> + Send + 'a

The future returned by writable.

Required Methods§

Source

fn readable(&'a self) -> Self::Readable

Wait until the stream is readable.

Source

fn writable(&'a self) -> Self::Writable

Wait until the stream is writable.

Implementors§

Source§

impl<'a, S: 'a + X11rbStream + Sync> StreamBase<'a> for StreamAdaptor<S>

Source§

type Readable = Readable<'a, S>

Source§

type Writable = Writable<'a, S>