pub struct Guard<'a> { /* private fields */ }
Expand description
A guard for an acquired wake lock.
To create a guard see WakeLock::acquire
.
The wake lock is released automatically when the guard is dropped, but
panics if there is an error releasing the wake lock. If you want to handle
errors on release then you can call Guard::release
instead.
The current thread will remain attached to the current JVM until the guard is released. The guard cannot be sent between threads.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Guard<'a>
impl<'a> RefUnwindSafe for Guard<'a>
impl<'a> !Send for Guard<'a>
impl<'a> !Sync for Guard<'a>
impl<'a> Unpin for Guard<'a>
impl<'a> UnwindSafe for Guard<'a>
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