[][src]Struct coreutils_core::os::utmpx::Utmpx

pub struct Utmpx { /* fields omitted */ }

A struct that represents a user account, where user can be humam users or other parts of the system that requires the usage of account structure, like some daemons.

Methods

impl Utmpx[src]

pub fn from_c_utmpx(utm: utmpx) -> Self[src]

Creates a new Utmpx entry from the C version of the structure.

pub fn user(&self) -> &BStr[src]

Get user name.

pub fn host(&self) -> &BStr[src]

Get host name.

pub fn process_id(&self) -> Pid[src]

Get the process ID.

pub fn id(&self) -> &BStr[src]

Get the record ID.

pub fn device_name(&self) -> &BStr[src]

Get the device name of the entry (usually a tty or console).

pub const fn entry_type(&self) -> UtmpxKind[src]

Get the type kind if the entry.

pub const fn timeval(&self) -> TimeVal[src]

Get the time where the entry was created. (often login time)

pub fn login_time(&self) -> DateTime[src]

Get the time where the entry was created (often login time) in a more complete structure.

Trait Implementations

impl Clone for Utmpx[src]

impl Debug for Utmpx[src]

impl Eq for Utmpx[src]

impl From<utmpx> for Utmpx[src]

fn from(c_utmpx: utmpx) -> Self[src]

Converts utmpx to Utmpx.

Panic

This function may panic when converting a number to UtmpxKind. Since we get the number from the OS it should never panic, but if the OS drastically change, it may panic.

impl Hash for Utmpx[src]

impl PartialEq<Utmpx> for Utmpx[src]

impl StructuralEq for Utmpx[src]

impl StructuralPartialEq for Utmpx[src]

Auto Trait Implementations

impl RefUnwindSafe for Utmpx

impl Send for Utmpx

impl Sync for Utmpx

impl Unpin for Utmpx

impl UnwindSafe for Utmpx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.