Struct logind_zbus::UserInterface [−][src]
Proxy wrapper for the logind User
dbus interface
All get_*
methods are property getters
Example
use logind_zbus::ManagerInterface; use logind_zbus::UserInterface; use zbus::Connection; let connection = Connection::new_system().unwrap(); let manager = ManagerInterface::new(&connection).unwrap(); let users = manager.list_users().unwrap(); let user = UserInterface::new(&connection, &users[0]).unwrap(); let time1 = user.get_timestamp().unwrap(); assert!(time1.as_secs() > 0); let time2 = user.get_timestamp_monotonic().unwrap(); assert!(time2.as_secs() > 0);
Implementations
impl<'a> UserInterface<'a>
[src]
pub fn new(connection: &Connection, user: &'a UserInfo) -> Result<Self>
[src]
pub fn get_proxy(&self) -> &UserProxy<'_>
[src]
Borrow the underlying UserProxy
for use with zbus directly
pub fn kill(&self, signal_number: i32) -> Result<()>
[src]
pub fn terminate(&self) -> Result<()>
[src]
They’ll be back
pub fn get_display(&self) -> Result<DbusPath>
[src]
Property: which graphical session should be used as the primary UI display for the user. It is a structure encoding the session ID and the object path of the session to use.
pub fn get_gid(&self) -> Result<u32>
[src]
Property: primary GID of the user
pub fn get_is_idle_hint(&self) -> Result<bool>
[src]
Property: idle hint state of the user
pub fn get_is_idle_since_hint(&self) -> Result<Duration>
[src]
Property: idle hint state of the user
pub fn get_is_idle_since_hint_monotonic(&self) -> Result<Duration>
[src]
Property: idle hint state of the user
pub fn get_linger(&self) -> Result<bool>
[src]
Property: shows whether lingering is enabled for this user
pub fn get_name(&self) -> Result<String>
[src]
Property: Users name
pub fn get_runtime_path(&self) -> Result<String>
[src]
Property: runtime path of the user, i.e. $XDG_RUNTIME_DIR
pub fn get_service(&self) -> Result<String>
[src]
Property: the unit name of the user systemd service of this user.
Each logged in user is assigned a user service that runs a user
systemd instance. This is usually an instance of user@.service
.
pub fn get_slice(&self) -> Result<String>
[src]
Property: unit name of the user systemd slice of this user. Each logged in user gets a private slice.
pub fn get_state(&self) -> Result<UserState>
[src]
Property: Users state
pub fn get_timestamp(&self) -> Result<Duration>
[src]
Property: login time of the user in microseconds since the epoch (realtime)
pub fn get_timestamp_monotonic(&self) -> Result<Duration>
[src]
Property: login time of the user in microseconds since the epoch (walltime)
pub fn get_uid(&self) -> Result<u32>
[src]
Property: Unix UID of the user
Auto Trait Implementations
impl<'a> !RefUnwindSafe for UserInterface<'a>
impl<'a> Send for UserInterface<'a>
impl<'a> Sync for UserInterface<'a>
impl<'a> Unpin for UserInterface<'a>
impl<'a> !UnwindSafe for UserInterface<'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>,