pub struct RustConnection<S: Stream = DefaultStream> { }
Expand description
A connection to an X11 server implemented in pure rust
This type is generic over S
, which allows to use a generic stream to communicate with the
server. This stream can written to and read from, but it can also be polled, meaning that one
checks if new data can be read or written.
RustConnection
always used an internal buffer for reading, so R
does not need
to be buffered.
Establish a new connection.
If no dpy_name
is provided, the value from $DISPLAY
is used.
Establish a new connection to the given streams.
read
is used for reading data from the X11 server and write
is used for writing.
screen
is the number of the screen that should be used. This function checks that a
screen with that number exists.
Establish a new connection to the given streams.
read
is used for reading data from the X11 server and write
is used for writing.
screen
is the number of the screen that should be used. This function checks that a
screen with that number exists.
The parameters auth_name
and auth_data
are used for the members
authorization_protocol_name
and authorization_protocol_data
of the SetupRequest
that
is sent to the X11 server.
Establish a new connection for an already connected stream.
The given stream
is used for communicating with the X11 server.
It is assumed that setup
was just received from the server. Thus, the first reply to a
request that is sent will have sequence number one.
Returns a reference to the contained stream.
Wait for a new raw/unparsed event from the X11 server.
Poll for a new unparsed/raw event from the X11 server.
Send all pending requests to the server.
Read more
Get the setup information sent by the X11 server.
Read more
Wait for a new event from the X11 server.
Wait for a new raw/unparsed event from the X11 server.
Wait for a new event from the X11 server.
Poll for a new event from the X11 server.
Poll for a new raw/unparsed event from the X11 server.
Poll for a new event from the X11 server.
Formats the value using the given formatter.
Read more
Type used as buffer to store raw replies or events before
they are parsed.
Send a request with a reply to the server.
Read more
Send a request with a reply containing file descriptors to the server.
Read more
Send a request without a reply to the server.
Read more
A reply to an error should be discarded.
Read more
Prefetches information about an extension.
Read more
Get information about an extension.
Read more
Check whether a request that does not have a reply caused an X11 error.
Read more
Wait for the reply to a request that has FDs.
Read more
The maximum number of bytes that the X11 server accepts in a request.
Prefetches the maximum request length.
Read more
Parse a generic error.
Parse a generic event.
Send a request with a reply to the server.
Read more
Send a request with a reply containing file descriptors to the server.
Read more
Send a request without a reply to the server.
Read more
Wait for the reply to a request that has FDs.
Read more
Check whether a request that does not have a reply caused an X11 error.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Negotiate the version of the DAMAGE extension.
Read more
Creates a Damage object to monitor changes to a drawable..
Read more
Destroys a previously created Damage object..
Read more
Remove regions from a previously created Damage object..
Read more
Add a region to a previously created Damage object..
Read more
Queries the version of this extension.
Read more
Ends a logical swap block.
Requests visuals that support double buffering.
get matching font names and information.
Read more
change graphics context components.
Read more
Change a property on a window with format 8.
Change a property on a window with format 16.
Change a property on a window with format 32.
Sets the disconnect mode for the client..
Read more
Query the version of the MIT-SHM extension..
Read more
Attach a System V shared memory segment..
Read more
Destroys the specified shared memory segment..
Read more
Copy data from the shared memory to the specified drawable..
Read more
Copies data from the specified drawable to the shared memory segment..
Read more
Create a pixmap backed by shared memory..
Read more
Asks the server to allocate a shared memory segment..
Read more
Negotiate the version of Composite.
Read more
Redirect the hierarchy starting at “window” to off-screen storage..
Read more
Redirect all current and future children of ‘window’.
Read more
Terminate redirection of the specified window..
Read more
Terminate redirection of the specified window’s children.
Read more
Returns the argument unchanged.
Instruments this type with the provided
Span
, returning an
Instrumented
wrapper.
Read more
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.