pub struct IdleManager { /* private fields */ }
Expand description
IdleManager is a struct that manages idle state and events. It provides functionality to register callbacks that are triggered when the system becomes idle, and to reset the idle timer when certain events occur.
Implementations§
Source§impl IdleManager
impl IdleManager
Sourcepub fn new(options: Option<IdleManagerOptions>) -> Self
pub fn new(options: Option<IdleManagerOptions>) -> Self
Constructs a new IdleManager
with the given options.
Sourcepub fn register_callback<F>(&self, callback: F)where
F: FnMut() + 'static,
pub fn register_callback<F>(&self, callback: F)where
F: FnMut() + 'static,
Registers a callback to be executed when the system becomes idle.
Trait Implementations§
Source§impl Clone for IdleManager
impl Clone for IdleManager
Source§fn clone(&self) -> IdleManager
fn clone(&self) -> IdleManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for IdleManager
impl !RefUnwindSafe for IdleManager
impl !Send for IdleManager
impl !Sync for IdleManager
impl Unpin for IdleManager
impl !UnwindSafe for IdleManager
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