Struct linux_api::sysinfo::linux_sysinfo

source ·
#[repr(C)]
pub struct linux_sysinfo {
Show 14 fields pub uptime: c_long, pub loads: [linux___kernel_ulong_t; 3], pub totalram: linux___kernel_ulong_t, pub freeram: linux___kernel_ulong_t, pub sharedram: linux___kernel_ulong_t, pub bufferram: linux___kernel_ulong_t, pub totalswap: linux___kernel_ulong_t, pub freeswap: linux___kernel_ulong_t, pub procs: c_ushort, pub pad: c_ushort, pub totalhigh: linux___kernel_ulong_t, pub freehigh: linux___kernel_ulong_t, pub mem_unit: c_uint, pub l_f: [c_char; 0],
}

Fields§

§uptime: c_long

Seconds since boot

§loads: [linux___kernel_ulong_t; 3]

1, 5, and 15 minute load averages

§totalram: linux___kernel_ulong_t

Total usable main memory size

§freeram: linux___kernel_ulong_t

Available memory size

§sharedram: linux___kernel_ulong_t

Amount of shared memory

§bufferram: linux___kernel_ulong_t

Memory used by buffers

§totalswap: linux___kernel_ulong_t

Total swap space size

§freeswap: linux___kernel_ulong_t

swap space still available

§procs: c_ushort

Number of current processes

§pad: c_ushort

Explicit padding for m68k

§totalhigh: linux___kernel_ulong_t

Total high memory size

§freehigh: linux___kernel_ulong_t

Available high memory size

§mem_unit: c_uint

Memory unit size in bytes

§l_f: [c_char; 0]

Padding: libc5 uses this..

Trait Implementations§

source§

impl Clone for linux_sysinfo

source§

fn clone(&self) -> linux_sysinfo

Returns a copy 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 linux_sysinfo

source§

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

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

impl Copy for linux_sysinfo

Auto Trait Implementations§

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.