#[non_exhaustive]pub enum SessionError {
NoBackend,
Inactive,
UnknownDevice,
Seat(String),
}Expand description
What can go wrong holding a session.
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.
NoBackend
No seat backend is available.
No logind session, no seatd, and no permission for the builtin fallback. A caller can still open devices directly; they simply will not survive a VT switch, which is the right trade for a tool that is not a compositor.
Inactive
The seat is not active, so devices cannot be opened.
Between a pause and the resume that follows it. Not an error in the usual sense – it is the session working – so a caller waits rather than gives up.
UnknownDevice
The device is not one this session opened.
Seat(String)
The seat refused.
Trait Implementations§
Source§impl Clone for SessionError
impl Clone for SessionError
Source§impl Debug for SessionError
impl Debug for SessionError
Source§impl Display for SessionError
impl Display for SessionError
impl Eq for SessionError
Source§impl Error for SessionError
impl Error for SessionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SessionError
impl PartialEq for SessionError
impl StructuralPartialEq for SessionError
Auto Trait Implementations§
impl Freeze for SessionError
impl RefUnwindSafe for SessionError
impl Send for SessionError
impl Sync for SessionError
impl Unpin for SessionError
impl UnsafeUnpin for SessionError
impl UnwindSafe for SessionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more