[−][src]Struct desk_logind::Logind
A logind client connection. This is a relatively thin wrapper over the D-Bus API.
Implementations
impl<'a> Logind<'a>
[src]
pub fn new(conn: &'a Connection) -> Logind
[src]
pub fn session(&self, id: &SessionId) -> Result<Session<'a>, LogindError>
[src]
Get a handle to a logind session by ID.
pub fn current_session(&self) -> Result<Session<'a>, LogindError>
[src]
Get a handle to the current logind session.
pub fn suspend(&self, interactive: bool) -> Result<(), LogindError>
[src]
Attempt to suspend the system. If interactive
, PolicyKit may prompt the current user
for authentication if needed.
pub fn reboot(&self, interactive: bool) -> Result<(), LogindError>
[src]
Attempt to reboot the system. If interactive
, PolicyKit may prompt the current user for
authentication.
pub fn power_off(&self, interactive: bool) -> Result<(), LogindError>
[src]
Attempt to power off the system. If interactive
, PolicyKit may prompt the current user for
authentication.
pub fn hibernate(&self, interactive: bool) -> Result<(), LogindError>
[src]
Attempt to hibernate the system. If interactive
, PolicyKit may prompt the current user for
authentication.
pub fn inhibit(
&self,
who: &str,
why: &str,
events: &InhibitEventSet,
mode: InhibitMode
) -> Result<InhibitorLock, LogindError>
[src]
&self,
who: &str,
why: &str,
events: &InhibitEventSet,
mode: InhibitMode
) -> Result<InhibitorLock, LogindError>
pub fn on_sleep<F: Fn(Logind) + Send + 'static, G: Fn(Logind) + Send + 'static>(
&self,
pre_sleep: F,
post_sleep: G
) -> Result<(), LogindError>
[src]
&self,
pre_sleep: F,
post_sleep: G
) -> Result<(), LogindError>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Logind<'a>
impl<'a> !Send for Logind<'a>
impl<'a> !Sync for Logind<'a>
impl<'a> Unpin for Logind<'a>
impl<'a> !UnwindSafe for Logind<'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>,