[−][src]Struct desk_logind::Session
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]
&self,
cb: F
) -> Result<(), LogindError>
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]
&self,
cb: F
) -> Result<(), LogindError>
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]
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,
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.
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>,