pub struct SystemStateCollector;Expand description
系统状态采集器
Implementations§
Source§impl SystemStateCollector
impl SystemStateCollector
Sourcepub fn snapshot(timestamp_ms: i64) -> SystemStateEvent
pub fn snapshot(timestamp_ms: i64) -> SystemStateEvent
获取当前系统状态快照
在 Android (daemon) 上:
- 电池: 读 /sys/class/power_supply/battery/capacity
- 网络: 读 /sys/class/net/*/operstate
- 位置: 通过 LocationManager (需要 Kotlin 端配合)
在 Linux 桌面上: 返回 fallback 值
Auto Trait Implementations§
impl Freeze for SystemStateCollector
impl RefUnwindSafe for SystemStateCollector
impl Send for SystemStateCollector
impl Sync for SystemStateCollector
impl Unpin for SystemStateCollector
impl UnsafeUnpin for SystemStateCollector
impl UnwindSafe for SystemStateCollector
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