pub trait WakeLockProvider: Send + Sync {
// Required methods
fn acquire(&self, type_: WakeLockType) -> Result<(), Box<dyn Error>>;
fn release(&self, type_: WakeLockType) -> Result<(), Box<dyn Error>>;
}Expand description
Trait for platform-specific wake lock support.
Implementations are responsible for interacting with the OS to prevent the screen (or other resources) from sleeping while a wake lock is held.