Struct utmp

Source
#[repr(C)]
pub struct utmp { pub ut_type: c_short, pub ut_pid: pid_t, pub ut_line: [u8; 32], pub ut_id: [u8; 4], pub ut_user: [u8; 32], pub ut_host: [u8; 256], pub ut_exit: exit_status, pub ut_session: i64, pub ut_tv: timeval, pub ut_addr_v6: [i32; 4], pub __unused: [u8; 20], }

Fields§

§ut_type: c_short

Type of record

§ut_pid: pid_t

PID of login process

§ut_line: [u8; 32]

Device name of tty - "/dev/"

§ut_id: [u8; 4]

Terminal name suffix, or inittab(5) ID

§ut_user: [u8; 32]

Username

§ut_host: [u8; 256]

Hostname for remote login, or kernel version for run-level message

§ut_exit: exit_status

Exit status of a process marked as DEAD_PROCESS; not used by Linux init

§ut_session: i64

Session ID (getsid(2)) used for windowing

§ut_tv: timeval

Time entry was made

§ut_addr_v6: [i32; 4]

Internet address of remote host; IPv4 address uses just ut_addr_v6[0]

§__unused: [u8; 20]

Reserved for future use

Trait Implementations§

Source§

impl Clone for utmp

Source§

fn clone(&self) -> utmp

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for utmp

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromBytes for utmp

Source§

fn ref_from(bytes: &[u8]) -> Option<&Self>
where Self: Sized,

Interprets the given bytes as a &Self without copying. Read more
Source§

fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
where Self: Sized,

Interprets the prefix of the given bytes as a &Self without copying. Read more
Source§

fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
where Self: Sized,

Interprets the suffix of the given bytes as a &Self without copying. Read more
Source§

fn slice_from(bytes: &[u8]) -> Option<&[Self]>
where Self: Sized,

Interprets the given bytes as a &[Self] without copying. Read more
Source§

fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
where Self: Sized,

Interprets the prefix of the given bytes as a &[Self] with length equal to count without copying. Read more
Source§

fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
where Self: Sized,

Interprets the suffix of the given bytes as a &[Self] with length equal to count without copying. Read more
Source§

fn read_from(bytes: &[u8]) -> Option<Self>
where Self: Sized,

Reads a copy of Self from bytes. Read more
Source§

fn read_from_prefix(bytes: &[u8]) -> Option<Self>
where Self: Sized,

Reads a copy of Self from the prefix of bytes. Read more
Source§

fn read_from_suffix(bytes: &[u8]) -> Option<Self>
where Self: Sized,

Reads a copy of Self from the suffix of bytes. Read more
Source§

impl FromZeroes for utmp

Source§

fn zero(&mut self)

Overwrites self with zeroes. Read more
Source§

fn new_zeroed() -> Self
where Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
Source§

impl Copy for utmp

Auto Trait Implementations§

§

impl Freeze for utmp

§

impl RefUnwindSafe for utmp

§

impl Send for utmp

§

impl Sync for utmp

§

impl Unpin for utmp

§

impl UnwindSafe for utmp

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.