[][src]Trait heim::host::os::linux::UserExt

pub trait UserExt {
    fn pid(&self) -> i32;
fn terminal(&self) -> &str;
fn id(&self) -> &str;
fn hostname(&self) -> &str;
fn address(&self) -> Option<IpAddr>;
fn session_id(&self) -> i32; }
This is supported on feature="host" only.

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

fn pid(&self) -> i32

This is supported on feature="host" only.

Returns the Pid of login process.

fn terminal(&self) -> &str

This is supported on feature="host" only.

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

fn id(&self) -> &str

This is supported on feature="host" only.

Returns the terminal identifier.

fn hostname(&self) -> &str

This is supported on feature="host" only.

Returns the hostname for remote login.

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

This is supported on feature="host" only.

Returns the IP address of remote host.

fn session_id(&self) -> i32

This is supported on feature="host" only.

Returns the Session ID.

Compatibility

Note that session id type is not portable and varies depending on target architecture.

Loading content...

Implementors

impl UserExt for User[src]

Loading content...