Struct x11rb_protocol::x11_utils::X11Error

source ·
pub struct X11Error {
    pub error_kind: ErrorKind,
    pub error_code: u8,
    pub sequence: u16,
    pub bad_value: u32,
    pub minor_opcode: u16,
    pub major_opcode: u8,
    pub extension_name: Option<String>,
    pub request_name: Option<&'static str>,
}
Expand description

Representation of an X11 error packet that was sent by the server.

Fields§

§error_kind: ErrorKind

The kind of error that occurred.

§error_code: u8

The kind of error that occurred as it appears “on the wire”.

§sequence: u16

The sequence number of the request that caused this error.

§bad_value: u32

The value in the request that caused the error.

§minor_opcode: u16

The minor opcode of the request that caused this error.

§major_opcode: u8

The major opcode of the request that caused this error.

§extension_name: Option<String>

Name of the extension that caused this error, if known.

§request_name: Option<&'static str>

Name of the request that caused this error, if known.

Implementations§

source§

impl X11Error

source

pub fn try_parse( data: &[u8], ext_info_provider: &dyn ExtInfoProvider, ) -> Result<Self, ParseError>

Parse an X11 error.

Trait Implementations§

source§

impl Clone for X11Error

source§

fn clone(&self) -> X11Error

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for X11Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&X11Error> for [u8; 32]

source§

fn from(input: &X11Error) -> Self

Converts to this type from the input type.
source§

impl From<X11Error> for [u8; 32]

source§

fn from(input: X11Error) -> Self

Converts to this type from the input type.
source§

impl PartialEq for X11Error

source§

fn eq(&self, other: &X11Error) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for X11Error

source§

impl StructuralPartialEq for X11Error

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.