pub struct SystemSnapshot {
pub cpu_usage: f32,
pub load_avg_1: f64,
pub total_memory: u64,
pub used_memory: u64,
pub disk_total: u64,
pub disk_available: u64,
pub os_name: String,
pub kernel_version: String,
pub uptime_secs: u64,
}Expand description
主机指标快照(由后台采样任务周期更新)。
Fields§
§cpu_usage: f32总体 CPU 使用率(百分比)。
load_avg_1: f64系统 1 分钟平均负载。
total_memory: u64总物理内存(字节)。
used_memory: u64已用物理内存(字节)。
disk_total: u64主磁盘总空间(字节,取根分区或最大盘)。
disk_available: u64主磁盘可用空间(字节)。
os_name: String操作系统版本(如 “macOS 15.5”)。
kernel_version: String内核版本。
uptime_secs: u64系统启动后秒数。
Trait Implementations§
Source§impl Clone for SystemSnapshot
impl Clone for SystemSnapshot
Source§fn clone(&self) -> SystemSnapshot
fn clone(&self) -> SystemSnapshot
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 SystemSnapshot
impl Debug for SystemSnapshot
Source§impl Default for SystemSnapshot
impl Default for SystemSnapshot
Source§fn default() -> SystemSnapshot
fn default() -> SystemSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SystemSnapshot
impl<'de> Deserialize<'de> for SystemSnapshot
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 SystemSnapshot
impl RefUnwindSafe for SystemSnapshot
impl Send for SystemSnapshot
impl Sync for SystemSnapshot
impl Unpin for SystemSnapshot
impl UnsafeUnpin for SystemSnapshot
impl UnwindSafe for SystemSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.
§impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
§fn transport_to_bytes(&self) -> Vec<u8> ⓘ
fn transport_to_bytes(&self) -> Vec<u8> ⓘ
Serialize the type to a byte vector for transport
§fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
Deserialize the type from a byte slice