Trait xcb::BaseError[][src]

pub trait BaseError {
    const EXTENSION: Option<Extension>;
    const NUMBER: u32;

    unsafe fn from_raw(raw: *mut xcb_generic_error_t) -> Self;
unsafe fn into_raw(self) -> *mut xcb_generic_error_t;
fn as_raw(&self) -> *mut xcb_generic_error_t;
fn as_slice(&self) -> &[u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
; }
Expand description

A trait to designate base protocol errors.

The base errors follow the usual resolution idiom of error_code offset.

This should be completely transparent to the user, as ProtocolError is resolving all types of errors together.

Associated Constants

The extension associated to this error, or None for the main protocol

The number associated to this error

Required methods

Build an error from a raw pointer

Safety

raw must be a valid pointer to the error, and be allocated with libc::malloc

Convert the error into a raw pointer

Safety

returned value should be freed with libc::free to avoid memory leak, or used to build a new error

Obtain the error as a raw pointer

Access to the raw error data

Implementors