Trait breadx::display::AsyncDisplay[][src]

pub trait AsyncDisplay: DisplayBase {
    fn poll_wait(&mut self, cx: &mut Context<'_>) -> Poll<Result>;
fn begin_send_request_raw(
        &mut self,
        req: RequestInfo,
        cx: &mut Context<'_>
    ) -> PollOr<(), RequestInfo>;
fn poll_send_request_raw(
        &mut self,
        cx: &mut Context<'_>
    ) -> Poll<Result<u16>>; }
Expand description

A wrapper around an asynchronous connection to the X server.

These kinds of Displays should be used in order to communicate with the X server asynchronously. The functions in this trait and its extension traits closely mirror those of the Display trait.

See the DisplayBase trait for more information on what the display is expected to do.

Required methods

Poll the current status of waiting for more input. There is no default implementation; the buffering strategy depends on the implementor. If this is called after a Poll::Ready is returned, it is assumed that the user wants to wait again.

This function should rarely be called by the user directly; instead, use AsyncDisplayExt::wait_async, or one of the functions that use it.

Begin sending a raw request to the server. In order to poll the status of this operation, use the poll_send_request_raw function.

This function should rarely be called by the user directly; instead, use AsyncDisplayExt::send_request_raw_async, or one of the functions that use it.

Poll an ongoing raw request operation. It should return Poll::Ready once the bytes passed in from begin_send_request_raw have been sent.

This function should rarely be called by the user directly; instead, use AsyncDisplayExt::send_request_raw_async, or one of the functions that use it.

Implementations on Foreign Types

Implementors