pub struct PairingBitBox<R: Runtime> { /* private fields */ }
Expand description
BitBox in the pairing state. Use get_pairing_code()
to display the pairing code to the user
and wait_confirm()
to proceed to the paired state.
Implementations§
Source§impl<R: Runtime> PairingBitBox<R>
impl<R: Runtime> PairingBitBox<R>
Sourcepub fn get_pairing_code(&self) -> Option<String>
pub fn get_pairing_code(&self) -> Option<String>
If a pairing code confirmation is required, this returns the pairing code. You must display
it to the user and then call wait_confirm()
to wait until the user confirms the code on
the BitBox.
If the BitBox was paired before and the pairing was persisted, the pairing step is
skipped. In this case, None
is returned. Also in this case, call wait_confirm()
to
establish the encrypted connection.
Sourcepub async fn wait_confirm(self) -> Result<PairedBitBox<R>, Error>
pub async fn wait_confirm(self) -> Result<PairedBitBox<R>, Error>
Proceed to the paired state.
Auto Trait Implementations§
impl<R> Freeze for PairingBitBox<R>
impl<R> !RefUnwindSafe for PairingBitBox<R>
impl<R> !Send for PairingBitBox<R>
impl<R> !Sync for PairingBitBox<R>
impl<R> Unpin for PairingBitBox<R>where
R: Unpin,
impl<R> !UnwindSafe for PairingBitBox<R>
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