pub struct PairingJoiner { /* private fields */ }Expand description
The joiner’s side of a pairing exchange.
Implementations§
Source§impl PairingJoiner
impl PairingJoiner
Sourcepub fn transmit(&mut self) -> Option<Vec<u8>>
pub fn transmit(&mut self) -> Option<Vec<u8>>
The next message to send, or None until more arrives. Call until None.
Sourcepub fn shown(&self) -> Option<&Shown>
pub fn shown(&self) -> Option<&Shown>
What this joiner must show a person now, once the responder sent it.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether the exchange succeeded and finish returns the peer.
Sourcepub fn finish(self) -> Result<Paired, PairingError>
pub fn finish(self) -> Result<Paired, PairingError>
Sourcepub fn receive(&mut self, message: &[u8]) -> Result<(), PairingError>
pub fn receive(&mut self, message: &[u8]) -> Result<(), PairingError>
Takes one message from the responder.
§Errors
PairingError::Refused when the responder refused or the key confirmation failed
(a refusal is then queued for the responder); PairingError::Protocol for a
malformed or unexpected message. The exchange is over after an error.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PairingJoiner
impl !UnwindSafe for PairingJoiner
impl Freeze for PairingJoiner
impl Send for PairingJoiner
impl Sync for PairingJoiner
impl Unpin for PairingJoiner
impl UnsafeUnpin for PairingJoiner
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