Struct Seat

Source
pub struct Seat { /* private fields */ }
Expand description

A seat has two identifiers, the physical name and the logical name.

A device is always assigned to exactly one seat. It may change to a different logical seat but it cannot change physical seats. See Seats for details.

Implementations§

Source§

impl Seat

Source

pub fn context(&self) -> Libinput

Get the libinput context from the seat.

Source

pub fn physical_name(&self) -> &str

Return the physical name of the seat.

For libinput contexts created from udev, this is always the same value as passed into udev_assign_seat and all seats from that context will have the same physical name.

The physical name of the seat is one that is usually set by the system or lower levels of the stack. In most cases, this is the base filter for devices - devices assigned to seats outside the current seat will not be available to the caller.

Source

pub fn logical_name(&self) -> &str

Return the logical name of the seat.

This is an identifier to group sets of devices within the compositor.

Trait Implementations§

Source§

impl AsRaw<libinput_seat> for Seat

Source§

fn as_raw(&self) -> *const libinput_seat

Receive a raw pointer representing this type.
Source§

impl Clone for Seat

Source§

fn clone(&self) -> Self

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 Context for Seat

Source§

fn context(&self) -> &Libinput

Returns the underlying libinput context
Source§

impl Debug for Seat

Source§

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

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

impl Drop for Seat

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl FromRaw<libinput_seat> for Seat

Source§

unsafe fn from_raw(ffi: *mut libinput_seat, context: &Libinput) -> Self

Create a new instance of this type from a raw pointer and it’s context. If the type of the struct is a valid libinput type, but is unknown to this library, it panics instead. Read more
Source§

impl Hash for Seat

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Seat

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Seat

Auto Trait Implementations§

§

impl Freeze for Seat

§

impl !RefUnwindSafe for Seat

§

impl !Send for Seat

§

impl !Sync for Seat

§

impl Unpin for Seat

§

impl !UnwindSafe for Seat

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

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>,

Source§

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.