pub trait WakeLockDelegate: 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.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".