pub trait AsyncDisplay: CanBeAsyncDisplay {
    fn poll_for_interest(
        &mut self,
        interest: Interest,
        callback: &mut dyn FnMut(&mut dyn AsyncDisplay, &mut Context<'_>) -> Result<()>,
        ctx: &mut Context<'_>
    ) -> Poll<Result<()>>; }
Expand description

A non-blocking interface to the X11 server.

This is an asynchronous version of the Display trait. It can do everything that a Display can do, but it doesn’t block and return values. Instead, it returns a Future that can be used to wait for the result.

Required Methods

Poll for an interest. If the interest if ready, call the provided callback.

This function is used to drive I/O. It should be called whenever the runtime is ready to wait on I/O, and should be implemented as follows:

  • Poll for the specific interest.
  • If the interest is ready, call the given callback.
  • Otherwise, return Pending.

Implementations on Foreign Types

Implementors