pub struct SharedChannel { /* private fields */ }Expand description
An open HID++ channel to a device, shared so DPI / SmartShift writes can reuse the capture session’s connection instead of re-enumerating and opening a fresh channel each time (which costs ~100ms+).
Cheap to clone (an Arc plus the DeviceRoute it points at). Built by
the capture session via SharedChannel::new and stashed in a slot the
GUI’s write path consults.
Implementations§
Sourcepub fn matches(&self, route: &DeviceRoute) -> bool
pub fn matches(&self, route: &DeviceRoute) -> bool
Whether this channel reaches route — so the write path only reuses it
for the device it actually points at.
Trait Implementations§
Source§fn clone(&self) -> SharedChannel
fn clone(&self) -> SharedChannel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
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