pub struct Connect { /* private fields */ }Implementations§
Source§impl Connect
impl Connect
Sourcepub fn auto() -> Self
pub fn auto() -> Self
asks every port a box could be behind, which for now means every CH343 (1A86:55D3) port
pub fn port(path: impl Into<PathBuf>) -> Self
Sourcepub fn can(self, action: Action) -> Self
pub fn can(self, action: Action) -> Self
skips a box that can’t do this, checked once when it opens, so with a keyboard box and a mouse box
plugged in .can(Action::Move) opens the mouse one. call it again for each thing it has to do.
Action::Connect matches no box
Sourcepub fn family(self, family: Family) -> Self
pub fn family(self, family: Family) -> Self
only tries this family, so the port never gets anything meant for another box
Sourcepub fn id(self, id: StableId) -> Self
pub fn id(self, id: StableId) -> Self
only the box with this id, whatever port it’s on. a box with no id (like a MAKCU whose USB serial can’t be trusted) can’t be picked this way, only by its port
Sourcepub fn click_timing(self, click_timing: ClickTiming) -> Self
pub fn click_timing(self, click_timing: ClickTiming) -> Self
what click() does on a box with no click of its own
pub fn open(self) -> Result<Device>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Connect
impl RefUnwindSafe for Connect
impl Send for Connect
impl Sync for Connect
impl Unpin for Connect
impl UnsafeUnpin for Connect
impl UnwindSafe for Connect
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