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).

Implementors§