pub struct TestPowerManager {
pub calls: Arc<Mutex<Vec<String>>>,
pub active_leases: Arc<Mutex<Vec<(String, LeaseToken)>>>,
}Fields§
§calls: Arc<Mutex<Vec<String>>>§active_leases: Arc<Mutex<Vec<(String, LeaseToken)>>>Implementations§
Trait Implementations§
Source§impl PowerManager for TestPowerManager
impl PowerManager for TestPowerManager
fn take_wake_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<WakeLease>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn power_element_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
lease_name: &'life1 str,
_dependency_token: DependencyToken,
_dependency_level: u8,
) -> Pin<Box<dyn Future<Output = Result<LeaseToken, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_suspend_blocker<'life0, 'life1, 'async_trait>(
&'life0 self,
_suspend_blocker: ClientEnd<SuspendBlockerMarker>,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<WakeLease, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for TestPowerManager
impl !UnwindSafe for TestPowerManager
impl Freeze for TestPowerManager
impl Send for TestPowerManager
impl Sync for TestPowerManager
impl Unpin for TestPowerManager
impl UnsafeUnpin for TestPowerManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more