[][src]Struct desk_logind::Session

pub struct Session<'a> { /* fields omitted */ }

Handle to a logind session

Implementations

impl<'a> Session<'a>[src]

pub fn name(&self) -> Result<String, LogindError>[src]

pub fn id(&self) -> Result<SessionId, LogindError>[src]

pub fn lock(&self) -> Result<(), LogindError>[src]

Lock this session by sending a Lock signal

pub fn on_lock<F: Fn(Logind) + Send + 'static>(
    &self,
    cb: F
) -> Result<(), LogindError>
[src]

Register a callback to run when the session is locked.

pub fn on_unlock<F: Fn(Logind) + Send + 'static>(
    &self,
    cb: F
) -> Result<(), LogindError>
[src]

Register a callback to run when the session is unlocked.

pub fn idle_hint(&self) -> Result<bool, LogindError>[src]

Gets the idle hint for the session.

pub fn set_idle_hint(&self, idle: bool) -> Result<(), LogindError>[src]

Sets the session idle hint.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Session<'a>

impl<'a> !Send for Session<'a>

impl<'a> !Sync for Session<'a>

impl<'a> Unpin for Session<'a>

impl<'a> !UnwindSafe for Session<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.