Trait XidNew

Source
pub trait XidNew: Xid {
    // Required method
    unsafe fn new(res_id: u32) -> Self;
}
Expand description

Trait for X resources that can be created directly from Connection::generate_id

The resources that cannot be created that way are the Xid unions, which are created from their underlying resource.

Required Methods§

Source

unsafe fn new(res_id: u32) -> Self

Build a new X resource

§Safety

res_id must be obtained from xcb_generate_id. 0 is also a valid value to create a null resource. Users should not use this function directly but rather use Connection::generate_id

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§