Struct hid_io_client::HidioConnection
source · pub struct HidioConnection { /* private fields */ }
Implementations§
source§impl HidioConnection
impl HidioConnection
pub fn new() -> Result<Self, Error>
sourcepub async fn connect(
&mut self,
auth: AuthType,
node_type: NodeType,
name: String,
serial_uid: String,
retry: bool,
retry_delay: Duration
) -> Result<(Option<Client>, Client), Error>
pub async fn connect( &mut self, auth: AuthType, node_type: NodeType, name: String, serial_uid: String, retry: bool, retry_delay: Duration ) -> Result<(Option<Client>, Client), Error>
Async connect If retry is true, block until there is a connection. retry_delay sets the amount of time to sleep between retries
Make sure to check the status of (hidio_auth, _) as you may not have successfully authenticated.
sourcepub async fn disconnect(&mut self) -> Result<(), Error>
pub async fn disconnect(&mut self) -> Result<(), Error>
Disconnect with hid-io-core And/or stop reconnecting
Auto Trait Implementations§
impl !RefUnwindSafe for HidioConnection
impl !Send for HidioConnection
impl !Sync for HidioConnection
impl Unpin for HidioConnection
impl !UnwindSafe for HidioConnection
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