pub struct Connect { /* private fields */ }Implementations§
Source§impl Connect
impl Connect
Sourcepub fn auto() -> Self
pub fn auto() -> Self
asks CH343 (1A86:55D3) ports and YSC V2 left ports (1A86:FE0C with serial TOWMCULEFT). a Ferrum is only
asked with .family(Family::Ferrum) (the other ports then) or Connect::port, and a YSC V1 only with
.family(Family::Ysc), which then asks every CH343 port at up to 9 rates
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 ferrum_api(self, api: FerrumApi) -> Self
pub fn ferrum_api(self, api: FerrumApi) -> Self
only a Ferrum on this API, so asking for Software never ends up on the box’s own legacy port. on Windows a Ferrum search without a port already only takes Software, so ask for Legacy here if that’s the one you want. other boxes don’t care about it
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
Sourcepub fn candidates(&self) -> Vec<String>
pub fn candidates(&self) -> Vec<String>
the ports scan and open would look at with these filters, see candidates(). with
.family(Family::Ferrum) that’s every port that isn’t a CH343 or a YSC port, plus on Windows the ones with no
USB id