PowerProvider

Trait PowerProvider 

Source
pub trait PowerProvider: Send + Sync {
    // Required methods
    fn perform_action<'life0, 'async_trait>(
        &'life0 self,
        action: PowerAction,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn schedule_action<'life0, 'life1, 'async_trait>(
        &'life0 self,
        action: PowerAction,
        at: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn cancel_scheduled<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn prevent_sleep<'life0, 'life1, 'async_trait>(
        &'life0 self,
        reason: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn allow_sleep<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Power management provider trait

Required Methods§

Source

fn perform_action<'life0, 'async_trait>( &'life0 self, action: PowerAction, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn schedule_action<'life0, 'life1, 'async_trait>( &'life0 self, action: PowerAction, at: &'life1 str, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn cancel_scheduled<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn prevent_sleep<'life0, 'life1, 'async_trait>( &'life0 self, reason: &'life1 str, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn allow_sleep<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§