pub struct DeviceManager<C>{ /* private fields */ }
Expand description
Device Manager manages searching input and output devices and monitoring them.
It packs all the functionality from cognitive-device-manager
in in single, easy to use
structure.
Implementations§
Source§impl<C> DeviceManager<C>
impl<C> DeviceManager<C>
Sourcepub fn new(
input_handler: Box<dyn InputHandling>,
input_forwarder: Box<dyn InputForwarding>,
input_config: InputConfig,
coordinator: C,
) -> Self
pub fn new( input_handler: Box<dyn InputHandling>, input_forwarder: Box<dyn InputForwarding>, input_config: InputConfig, coordinator: C, ) -> Self
Constructs new DeviceManager
.
Source§impl<C> DeviceManager<C>
Event handlers
impl<C> DeviceManager<C>
Event handlers
Sourcepub fn on_suspend(&mut self)
pub fn on_suspend(&mut self)
This method is called when application is going to suspend (e.g. virtual terminal was switched).
Sourcepub fn on_wakeup(&mut self)
pub fn on_wakeup(&mut self)
This method is called when application is going to wake up from suspension.
Sourcepub fn on_inputs_changed(&mut self)
pub fn on_inputs_changed(&mut self)
This method is called when state of one of input devices changed (was added or removed).
Sourcepub fn on_outputs_changed(&mut self)
pub fn on_outputs_changed(&mut self)
This method is called when state of one of output devices changed (was added or removed).
Auto Trait Implementations§
impl<C> Freeze for DeviceManager<C>where
C: Freeze,
impl<C> !RefUnwindSafe for DeviceManager<C>
impl<C> !Send for DeviceManager<C>
impl<C> !Sync for DeviceManager<C>
impl<C> Unpin for DeviceManager<C>where
C: Unpin,
impl<C> !UnwindSafe for DeviceManager<C>
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