pub struct Resource {
pub vm_active: u32,
pub cpu_total: u64,
pub cpu_used: u32,
pub mem_total: u64,
pub mem_used: u32,
pub disk_total: u64,
pub disk_used: u32,
}
Expand description
已分配的资源信息,
*_used
字段使用 u32 类型,
防止统计数据时的加和运算溢出
Fields§
§vm_active: u32
Vm 数量
cpu_total: u64
Cpu 核心数
cpu_used: u32
已使用的 Cpu
mem_total: u64
内存容量(MB)
mem_used: u32
已使用的内存(MB)
disk_total: u64
磁盘容量(MB)
disk_used: u32
已使用的磁盘(MB)
Implementations§
Trait Implementations§
impl Copy for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
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