#[non_exhaustive]
pub enum Request { Authenticate { application: String, reason: String, }, PointerMotion { delta_x: f64, delta_y: f64, }, Button { button: u32, state: u32, }, Axis { axis: u32, value: f64, }, TouchDown { id: u32, x: f64, y: f64, }, TouchMotion { id: u32, x: f64, y: f64, }, TouchUp { id: u32, }, TouchCancel, TouchFrame, PointerMotionAbsolute { x: f64, y: f64, }, KeyboardKey { button: u32, state: u32, }, }

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Authenticate

Fields

§application: String

user visible name of the application

§reason: String

reason why the application wants to use this interface

Information why the client wants to use the interface

A client should use this request to tell the compositor why it wants to use this interface. The compositor might use the information to decide whether it wants to grant the request. The data might also be passed to the user to decide whether the application should get granted access to this very privileged interface.

§

PointerMotion

Fields

§delta_x: f64
§delta_y: f64
§

Button

Fields

§button: u32
§state: u32
§

Axis

Fields

§axis: u32
§value: f64
§

TouchDown

Fields

§id: u32

unique id for touch down event

§x: f64

x coordinate for touch down event

§y: f64

y coordinate for touch down event

touch down event

A client should use this request to send touch down event at specific coordinates.

Only available since version 2 of the interface

§

TouchMotion

Fields

§id: u32

unique id for touch motion event

§x: f64

x coordinate for touch motion event

§y: f64

y coordinate for touch motion event

touch motion event

A client should use this request to send touch motion to specific position.

Only available since version 2 of the interface

§

TouchUp

Fields

§id: u32

unique id for touch up event

touch up event

A client should use this request to send touch up event.

Only available since version 2 of the interface

§

TouchCancel

touch cancel event

A client should use this request to cancel the current touch event.

Only available since version 2 of the interface

§

TouchFrame

touch frame event

A client should use this request to send touch frame event.

Only available since version 2 of the interface

§

PointerMotionAbsolute

Fields

Only available since version 3 of the interface

§

KeyboardKey

Fields

§button: u32
§state: u32

Only available since version 4 of the interface

Implementations§

source§

impl Request

source

pub fn opcode(&self) -> u16

Get the opcode number of this message

Trait Implementations§

source§

impl Debug for Request

source§

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

Formats the value using the given formatter. Read more

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
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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, 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.