pub enum UtmpxRecord {
Traditional(Box<Utmpx>),
Systemd(SystemdUtmpxCompat),
}Expand description
Wrapper type that can hold either traditional utmpx records or systemd records
Variants§
Traditional(Box<Utmpx>)
Systemd(SystemdUtmpxCompat)
Implementations§
Source§impl UtmpxRecord
impl UtmpxRecord
Sourcepub fn record_type(&self) -> i16
pub fn record_type(&self) -> i16
A.K.A. ut.ut_type
Sourcepub fn terminal_suffix(&self) -> String
pub fn terminal_suffix(&self) -> String
A.K.A. ut.ut_id
Sourcepub fn tty_device(&self) -> String
pub fn tty_device(&self) -> String
A.K.A. ut.ut_line
Sourcepub fn login_time(&self) -> OffsetDateTime
pub fn login_time(&self) -> OffsetDateTime
A.K.A. ut.ut_tv
Sourcepub fn exit_status(&self) -> (i16, i16)
pub fn exit_status(&self) -> (i16, i16)
A.K.A. ut.ut_exit
Return (e_termination, e_exit)
Sourcepub fn is_user_process(&self) -> bool
pub fn is_user_process(&self) -> bool
check if the record is a user process
Sourcepub fn canon_host(&self) -> IOResult<String>
pub fn canon_host(&self) -> IOResult<String>
Canonicalize host name using DNS
Auto Trait Implementations§
impl Freeze for UtmpxRecord
impl RefUnwindSafe for UtmpxRecord
impl Send for UtmpxRecord
impl Sync for UtmpxRecord
impl Unpin for UtmpxRecord
impl UnwindSafe for UtmpxRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more