pub struct DeviceWorkerImpl { /* private fields */ }Expand description
Device worker implementation
Implementations§
Source§impl DeviceWorkerImpl
impl DeviceWorkerImpl
Sourcepub fn new_usb(
thread_id: u32,
device: &PoKeysDevice,
device_index: u32,
refresh_interval: u64,
) -> Result<(Self, Receiver<DeviceCommand>)>
pub fn new_usb( thread_id: u32, device: &PoKeysDevice, device_index: u32, refresh_interval: u64, ) -> Result<(Self, Receiver<DeviceCommand>)>
Create a new device worker for USB device
Sourcepub fn new_network(
thread_id: u32,
device: &PoKeysDevice,
device_summary: NetworkDeviceSummary,
refresh_interval: u64,
) -> Result<(Self, Receiver<DeviceCommand>)>
pub fn new_network( thread_id: u32, device: &PoKeysDevice, device_summary: NetworkDeviceSummary, refresh_interval: u64, ) -> Result<(Self, Receiver<DeviceCommand>)>
Create a new device worker for network device
Sourcepub fn with_logger(self, logger: Arc<ThreadLogger>) -> Self
pub fn with_logger(self, logger: Arc<ThreadLogger>) -> Self
Set the logger
Trait Implementations§
Source§impl DeviceWorker for DeviceWorkerImpl
impl DeviceWorker for DeviceWorkerImpl
Source§fn status(&self) -> ThreadStatus
fn status(&self) -> ThreadStatus
Get the status of the worker thread
Get the shared state
Source§fn send_command(&self, command: DeviceCommand) -> Result<()>
fn send_command(&self, command: DeviceCommand) -> Result<()>
Send a command to the worker thread
Source§fn command_sender(&self) -> &Sender<DeviceCommand>
fn command_sender(&self) -> &Sender<DeviceCommand>
Get the command sender
Source§fn set_log_level(&mut self, level: LevelFilter) -> Result<()>
fn set_log_level(&mut self, level: LevelFilter) -> Result<()>
Set the log level
Auto Trait Implementations§
impl Freeze for DeviceWorkerImpl
impl !RefUnwindSafe for DeviceWorkerImpl
impl Send for DeviceWorkerImpl
impl Sync for DeviceWorkerImpl
impl Unpin for DeviceWorkerImpl
impl !UnwindSafe for DeviceWorkerImpl
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