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:
DisplayBaseprovides the basic functionality that either does not require I/O, or where blocking is not a consideration. This includes accessing theSetupand polling for replies or events.Displayis a blocking interface that can be used to send requests, receive replies, and receive events.AsyncDisplay(requires theasyncfeature) is a non-blocking version ofDisplay.
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.
BasicDisplayis the main implementation ofDisplay. It is a reasonable default for most applications. The main downside is that it requires mutable (&mut) access.CellDisplayallows for concurrent access, but is not thread safe.SyncDisplay(requires thesync_displayfeature) 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.
Traits
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.