Struct logind_zbus::SeatInterface [−][src]
Proxy wrapper for the logind Seat
dbus interface
Example
use logind_zbus::ManagerInterface; use logind_zbus::SeatInterface; use zbus::Connection; let connection = Connection::new_system().unwrap(); let manager = ManagerInterface::new(&connection).unwrap(); let seats = manager.list_seats().unwrap(); let seat = SeatInterface::new(&connection, &seats[0]).unwrap(); assert!(seat.get_active_session().is_ok()); assert!(manager.can_suspend().is_ok());
Implementations
impl<'a> SeatInterface<'a>
[src]
pub fn new(connection: &Connection, path: &'a DbusPath) -> Result<Self>
[src]
pub fn get_proxy(&self) -> &SeatProxy<'_>
[src]
Borrow the underlying SeatProxy
for use with zbus directly
pub fn activate_session(&self, session_id: &str) -> Result<()>
[src]
Brings the session with the specified ID into the foreground if the session_id matches
pub fn switch_to(&self, vtnr: u32) -> Result<()>
[src]
Switches to the session on the virtual terminal
pub fn switch_to_next(&self) -> Result<()>
[src]
Switches to next session on the virtual terminal
If there is no active session, switches to the first session.
pub fn switch_to_previous(&self) -> Result<()>
[src]
Switches to previous session on the virtual terminal
If there is no active session, switches to the first session.
pub fn terminate(&self) -> Result<()>
[src]
Nuke the seat
pub fn get_active_session(&self) -> Result<DbusPath>
[src]
Property: currently active session if there is one
pub fn get_can_graphical(&self) -> Result<bool>
[src]
Property: the session is suitable for graphical logins
pub fn get_can_tty(&self) -> Result<bool>
[src]
Property: the session is suitable for text logins
pub fn get_id(&self) -> Result<String>
[src]
Property: seat ID
pub fn get_idle_hint(&self) -> Result<bool>
[src]
Property: Is the seat idle
pub fn get_idle_since_hint(&self) -> Result<Duration>
[src]
Property: timestamp of the last change of the idle hint boolean (realtime)
pub fn get_idle_since_hint_monotonic(&self) -> Result<Duration>
[src]
Property: timestamp of the last change of the idle hint boolean (walltime)
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SeatInterface<'a>
impl<'a> Send for SeatInterface<'a>
impl<'a> Sync for SeatInterface<'a>
impl<'a> Unpin for SeatInterface<'a>
impl<'a> !UnwindSafe for SeatInterface<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,