Skip to main content

PowerManager

Trait PowerManager 

Source
pub trait PowerManager: Send + Sync {
    // Required method
    fn watch_battery(self: Arc<Self>) -> BoxStream<'static, (bool, WakeLease)>;
}

Required Methods§

Source

fn watch_battery(self: Arc<Self>) -> BoxStream<'static, (bool, WakeLease)>

Returns a stream of battery status changes (true if using battery).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§