Expand description

Displays, used to connect to the X11 server.

Communication with the X11 server takes place by sending or receiving requests through the Display apparatus. These Displays, which are usually some kind of state coupled with an I/O Connection, are responsible for sending and receiving the data, as well as serializing and deserializing the requests and replies.

Traits

There are three primary traits in this module that define the behavior of these apparati:

  • DisplayBase provides the basic functionality that either does not require I/O, or where blocking is not a consideration. This includes accessing the Setup and polling for replies or events.
  • Display is a blocking interface that can be used to send requests, receive replies, and receive events.
  • AsyncDisplay (requires the async feature) is a non-blocking version of Display.

Most user functionality is implemented in extension traits like DisplayFunctionsExt, and wraps around the methods defined in the above traits.

Implementations

In addition, this module provides implementations of these traits that wrap Connection implementations, written in pure Rust. All of these types implement DisplayBase and Display. If wrapped in the appropriate runtime primitives, they may also implement AsyncDisplay.

  • BasicDisplay is the main implementation of Display. It is a reasonable default for most applications. The main downside is that it requires mutable (&mut) access.
  • CellDisplay allows for concurrent access, but is not thread safe.
  • SyncDisplay (requires the sync_display feature) allows for thread-safe concurrent access, but at a minor performance cost.

Structs

An implementation of Display that requires a mutable reference to use.

An implementation of Display that can be used immutably through thread-unsafe cells.

A sequence number indicating the state of a request.

The raw reply.

The raw request.

A Display that uses a mutex to coordinate access.

Enums

The status of an async function.

The interest to poll the runtime for.

Traits

A non-blocking interface to the X11 server.

Extension trait to allow for sending generic requests and replies.

A display that can be async, if wrapped in an async runtime.

A blocking interface to the X11 server.

An interface to the X11 server, containing functionality that is neither inherently synchronous nor asynchronous.

Extension traits to allow for sending generic requests and replies.

Functions

Create a new RawRequest from a ReplyFDsRequest type.

Create a new RawRequest from a ReplyRequest type.

Create a new RawRequest from a VoidRequest type.

Type Definitions

A Display that has connected to an X11 server using the usual transports.