#x11 #xcb #interop #api #connection #traits #libxcb

no-std as-raw-xcb-connection

Trait to facilitate interoperatibility with libxcb C API

3 releases (stable)

1.0.1 Dec 17, 2023
1.0.0 Jan 7, 2023
0.1.0 Jan 2, 2023

#133 in Unix APIs

Download history 51332/week @ 2024-07-24 51323/week @ 2024-07-31 56711/week @ 2024-08-07 54470/week @ 2024-08-14 52886/week @ 2024-08-21 55313/week @ 2024-08-28 59616/week @ 2024-09-04 54384/week @ 2024-09-11 61306/week @ 2024-09-18 64314/week @ 2024-09-25 69056/week @ 2024-10-02 67775/week @ 2024-10-09 66741/week @ 2024-10-16 66270/week @ 2024-10-23 71350/week @ 2024-10-30 69984/week @ 2024-11-06

286,754 downloads per month
Used in 267 crates (5 directly)

MIT/Apache

7KB
56 lines

This crate provides the trait AsRawXcbConnection.

The idea is to facilitate interoperability in the ecosystem. The problem is as follows:

There are multiple crates that wrap the libxcb C API to provide a "connection" type. There are also multiple crates wrapping various C libraries that need a pointer to xcb_connection_t to work correctly.

Without this library, API consumers must pick one Rust library that wraps libxcb and only accept this type in its public API. Worse, one must also pick a specific version of the crate and would then only work with that type.

The trait AsRawXcbConnection breaks this connection. All libraries that wrap libxcb can implement this trait. This makes one independent from specific versions of API consumer crates.

No runtime deps

Features