Expand description
Monitor memory level.
§Examples
use ashpd::desktop::memory_monitor::MemoryMonitor;
use futures_util::StreamExt;
async fn run() -> ashpd::Result<()> {
let proxy = MemoryMonitor::new().await?;
let level = proxy
.receive_low_memory_warning()
.await?
.next()
.await
.expect("Stream exhausted");
println!("{}", level);
Ok(())
}
Structs§
- The interface provides information about low system memory to sandboxed applications.