pub struct SystemdUtmpxCompat { /* private fields */ }Expand description
Wrapper to provide utmpx-compatible interface for a single record
Implementations§
Source§impl SystemdUtmpxCompat
impl SystemdUtmpxCompat
Sourcepub fn new(record: SystemdLoginRecord) -> Self
pub fn new(record: SystemdLoginRecord) -> Self
Create new instance from a SystemdLoginRecord
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
Login time
Sourcepub fn exit_status(&self) -> (i16, i16)
pub fn exit_status(&self) -> (i16, i16)
Exit status (not available from systemd)
Sourcepub fn is_user_process(&self) -> bool
pub fn is_user_process(&self) -> bool
Check if this is a user process record
Sourcepub fn canon_host(&self) -> String
pub fn canon_host(&self) -> String
Canonical host name
Auto Trait Implementations§
impl Freeze for SystemdUtmpxCompat
impl RefUnwindSafe for SystemdUtmpxCompat
impl Send for SystemdUtmpxCompat
impl Sync for SystemdUtmpxCompat
impl Unpin for SystemdUtmpxCompat
impl UnsafeUnpin for SystemdUtmpxCompat
impl UnwindSafe for SystemdUtmpxCompat
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