Struct x11rb::xcb_ffi::XCBConnection[][src]

pub struct XCBConnection { /* fields omitted */ }

A connection to an X11 server.

This type wraps *mut xcb_connection_t that is provided by libxcb. It provides a rust interface to this C library.

Implementations

impl XCBConnection[src]

pub fn connect(
    dpy_name: Option<&CStr>
) -> Result<(XCBConnection, usize), ConnectError>
[src]

Establish a new connection to an X11 server.

If a dpy_name is provided, it describes the display that should be connected to, for example 127.0.0.1:1. If no value is provided, the $DISPLAY environment variable is used.

pub unsafe fn from_raw_xcb_connection(
    ptr: *mut c_void,
    should_drop: bool
) -> Result<XCBConnection, ConnectError>
[src]

Create a connection wrapper for a raw libxcb xcb_connection_t.

xcb_disconnect is called on drop only if should_drop is true.

Safety

If should_drop is false, the connection must live longer than the returned XCBConnection. If should_drop is true, the returned XCBConnection will take the ownership of the connection.

pub fn has_error(&self) -> Option<ConnectionError>[src]

Check if the underlying XCB connection is in an error state.

pub fn get_raw_xcb_connection(&self) -> *mut c_void[src]

Get access to the raw libxcb xcb_connection_t.

The returned pointer is valid for as long as the original object was not dropped. No ownerhsip is transferred.

Trait Implementations

impl AsRawFd for XCBConnection[src]

impl Connection for XCBConnection[src]

impl Debug for XCBConnection[src]

impl RequestConnection for XCBConnection[src]

type Buf = CSlice

Type used as buffer to store raw replies or events before they are parsed. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<C> ConnectionExt for C where
    C: ConnectionExt + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<C> ConnectionExt for C where
    C: RequestConnection + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.