[][src]Enum utmp_rs::UtmpEntry

#[non_exhaustive]
pub enum UtmpEntry {
    Empty,
    RunLevel {
        kernel_version: String,
        time: DateTime<Utc>,
    },
    BootTime(DateTime<Utc>),
    NewTime(DateTime<Utc>),
    OldTime(DateTime<Utc>),
    InitProcess {
        pid: pid_t,
        time: DateTime<Utc>,
    },
    LoginProcess {
        pid: pid_t,
        time: DateTime<Utc>,
    },
    UserProcess {
        pid: pid_t,
        line: String,
        user: String,
        host: String,
        session: pid_t,
        time: DateTime<Utc>,
    },
    DeadProcess {
        pid: pid_t,
    },
    Accounting,
}

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty

Record does not contain valid info

RunLevel

Change in system run-level (see init(8))

Fields of RunLevel

kernel_version: String

Kernel version

time: DateTime<Utc>

Time entry was made

BootTime(DateTime<Utc>)

Time of system boot

NewTime(DateTime<Utc>)

Time after system clock change

OldTime(DateTime<Utc>)

Time before system clock change

InitProcess

Process spawned by init(8)

Fields of InitProcess

pid: pid_t

PID of the init process

time: DateTime<Utc>

Time entry was made

LoginProcess

Session leader process for user login

Fields of LoginProcess

pid: pid_t

PID of the login process

time: DateTime<Utc>

Time entry was made

UserProcess

Normal process

Fields of UserProcess

pid: pid_t

PID of login process

line: String

Device name of tty

user: String

Username

host: String

Hostname for remote login

session: pid_t

Session ID (getsid(2))

time: DateTime<Utc>

Time entry was made

DeadProcess

Terminated process

Fields of DeadProcess

pid: pid_t

PID of the terminated process

Accounting

Not implemented

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Trait Implementations

impl Clone for UtmpEntry[src]

impl Debug for UtmpEntry[src]

impl Eq for UtmpEntry[src]

impl PartialEq<UtmpEntry> for UtmpEntry[src]

impl StructuralEq for UtmpEntry[src]

impl StructuralPartialEq for UtmpEntry[src]

impl<'a> TryFrom<&'a utmp> for UtmpEntry[src]

type Error = UtmpError

The type returned in the event of a conversion error.

Auto Trait Implementations

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.