pub struct NameConnection { /* private fields */ }
Expand description

A connection that can be derived from a parsed display name.

This is the primary Connection type that is used in breadx, as it represents the most common byte streams that are used to connect to the X11 server on modern OS. The display name, usually stored in the DISPLAY environment variable, is parsed and the connection is created from the parsed information.

This is a wrapper around either StdConnection<TcpStream> or, if on Unix, SendmsgConnection.

Implementations

Creates a new connection from a display name.

Blocking

This function blocks while it tries to connect to the server. Use the [new_async] function if you would like a non-blocking variant.

Creates a new connection from an already parsed display name.

Blocking

This function blocks while it tries to connect to the server. Use the [from_parsed_display_async] function if you would like a non-blocking variant.

Get the peer address and family used in this connection.

This is useful, since the xauth interface requires the family and address to be known.

If there is an error associated with this socket, take it.

Create a NameConnection in a non-blocking manner.

This function does not block, and will select the first connection that is available. The resolv parameter should poll the connection until it is writable using the currently availably runtime.

Trait Implementations

Extracts the raw file descriptor. Read more

Write a series of I/O slices and a series of file descriptors to the X11 server. Read more

Read data to a series of I/O slices and a buffer for file descriptors. Read more

Write a series of I/O slices to the X11 server. Read more

Write a slice of data to the X11 server. Read more

Read data to a single I/O slice and a buffer for file descriptors. Read more

Read data for a single I/O slice. Read more

Flush all data in this connection’s buffer. Read more

Shutdown this connection. Read more

Receive data from the X11 server into a single slice, in a non-blocking manner. Read more

Receive data from the X11 server into a set of I/O slices, in a non-blocking manner. Read more

Write a series of I/O slices and a series of file descriptors to the X11 server. Read more

Read data to a series of I/O slices and a buffer for file descriptors. Read more

Write a series of I/O slices to the X11 server. Read more

Write a slice of data to the X11 server. Read more

Read data to a single I/O slice and a buffer for file descriptors. Read more

Read data for a single I/O slice. Read more

Flush all data in this connection’s buffer. Read more

Shutdown this connection. Read more

Receive data from the X11 server into a single slice, in a non-blocking manner. Read more

Receive data from the X11 server into a set of I/O slices, in a non-blocking manner. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more