pub struct SystemState {
pub os: String,
pub arch: String,
pub host_name: String,
pub uptime: u64,
pub cpu: Option<CpuState>,
pub mem_state: MemState,
pub disk_state: DiskState,
pub net_state: NetState,
pub gpu_state: Option<GpuState>,
}Fields§
§os: String操作系统及版本,如: Ubuntu 22.04
arch: String系统架构
host_name: String主机名
uptime: u64运行时间,单位:秒
cpu: Option<CpuState>CPU 状态
mem_state: MemState内存状态
disk_state: DiskState磁盘状态
net_state: NetState网络状态
gpu_state: Option<GpuState>GPU 状态
Trait Implementations§
Source§impl Clone for SystemState
impl Clone for SystemState
Source§fn clone(&self) -> SystemState
fn clone(&self) -> SystemState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemState
impl Debug for SystemState
Source§impl Default for SystemState
impl Default for SystemState
Source§fn default() -> SystemState
fn default() -> SystemState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SystemState
impl<'de> Deserialize<'de> for SystemState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SystemState
impl RefUnwindSafe for SystemState
impl Send for SystemState
impl Sync for SystemState
impl Unpin for SystemState
impl UnsafeUnpin for SystemState
impl UnwindSafe for SystemState
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