pub struct Utmpx { /* private fields */ }Implementations§
source§impl Utmpx
impl Utmpx
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 into_inner(self) -> utmpx
pub fn into_inner(self) -> utmpx
Consumes the Utmpx, returning the underlying C struct utmpx
pub fn is_user_process(&self) -> bool
sourcepub fn canon_host(&self) -> IOResult<String>
pub fn canon_host(&self) -> IOResult<String>
Canonicalize host name using DNS
sourcepub fn iter_all_records() -> UtmpxIter ⓘ
pub fn iter_all_records() -> UtmpxIter ⓘ
Iterate through all the utmp records.
This will use the default location, or the path Utmpx::iter_all_records_from
was most recently called with.
Only one instance of UtmpxIter may be active at a time. This
function will block as long as one is still active. Beware!
sourcepub fn iter_all_records_from<P: AsRef<Path>>(path: P) -> UtmpxIter ⓘ
pub fn iter_all_records_from<P: AsRef<Path>>(path: P) -> UtmpxIter ⓘ
Iterate through all the utmp records from a specific file.
No failure is reported or detected.
This function affects subsequent calls to Utmpx::iter_all_records.
The same caveats as for Utmpx::iter_all_records apply.
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§
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