Skip to main content

SysInfo

Struct SysInfo 

Source
#[repr(C)]
pub struct SysInfo {
Show 13 fields pub uptime: i64, pub loads: [u64; 3], pub total_ram: u64, pub free_ram: u64, pub shared_ram: u64, pub buffer_ram: u64, pub total_swap: u64, pub free_swap: u64, pub num_procs: u16, pub _pad: u16, pub total_high_mem: u64, pub free_high_mem: u64, pub mem_unit: u32,
}
Expand description

System-info shuttle structure.

Fields§

§uptime: i64

Seconds since boot.

§loads: [u64; 3]

1m, 5m, and 15m load averages

§total_ram: u64

Total usable main memory size in ’mem_unit’s

§free_ram: u64

Available memory size in ’mem_unit’s

§shared_ram: u64

Amount of shared memory in ’mem_unit’s

§buffer_ram: u64

Memory used by buffers in ’mem_unit’s

§total_swap: u64

Total swap space size

§free_swap: u64

Swap space still available

§num_procs: u16

Number of current processes

§_pad: u16§total_high_mem: u64

Total high memory size

§free_high_mem: u64

Available high memory size

§mem_unit: u32

Memory unit size in bytes

Trait Implementations§

Source§

impl Clone for SysInfo

Source§

fn clone(&self) -> SysInfo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for SysInfo

Source§

impl Debug for SysInfo

Source§

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

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

impl Default for SysInfo

Source§

fn default() -> SysInfo

Returns the “default value” for a type. Read more
Source§

impl Eq for SysInfo

Source§

impl PartialEq for SysInfo

Source§

fn eq(&self, other: &SysInfo) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for 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, 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.