iced-yoda/winit/src/system.rs
2022-04-26 18:55:52 -03:00

14 lines
420 B
Rust

//! Access the native system.
use crate::command::{self, Command};
pub use iced_native::system::*;
/// Query for available system information.
///
/// Returns `None` if not using the `sysinfo` feature flag.
pub fn information<Message>(
f: impl Fn(Option<Information>) -> Message + 'static,
) -> Command<Message> {
Command::single(command::Action::System(Action::QueryInformation(
Box::new(f),
)))
}