heim_host::os::linux

Trait UserExt

Source
pub trait UserExt {
    // Required methods
    fn pid(&self) -> Pid;
    fn terminal(&self) -> &str;
    fn id(&self) -> &str;
    fn hostname(&self) -> &str;
    fn address(&self) -> Option<IpAddr>;
    fn session_id(&self) -> i32;
}
Expand description

Linux-specific extensions for User.

In Linux user information is provided by utmpx (see man utmpx(5)), trait methods are representing fields of this struct.

Required Methods§

Source

fn pid(&self) -> Pid

Returns the Pid of login process.

Source

fn terminal(&self) -> &str

Returns the tty or pseudo-tty name associated with user.

Source

fn id(&self) -> &str

Returns the terminal identifier.

Source

fn hostname(&self) -> &str

Returns the hostname for remote login.

Source

fn address(&self) -> Option<IpAddr>

Returns the IP address of remote host.

Source

fn session_id(&self) -> i32

Returns the Session ID.

Implementors§