pub struct RequesterPairing { /* private fields */ }Expand description
Requester exchange. No peer is returned until the storage MAC verifies.
Implementations§
Source§impl RequesterPairing
impl RequesterPairing
pub fn new( code: PairingCode, qr: Option<[u8; 16]>, pin: Pin, info: PeerInfo, rng: &mut (impl CryptoRng + RngCore), ) -> Self
Sourcepub fn answer(
&mut self,
answer: PairAnswer,
host_pin: Pin,
ctx: [u8; 32],
) -> Result<PairConfirm, PairError>
pub fn answer( &mut self, answer: PairAnswer, host_pin: Pin, ctx: [u8; 32], ) -> Result<PairConfirm, PairError>
Verify the host proof and produce the requester proof.
§Errors
Every failure returns only Refused; another answer cannot be tried.
Trait Implementations§
Auto Trait Implementations§
impl Forget for RequesterPairing
impl Freeze for RequesterPairing
impl Move for RequesterPairing
impl RefUnwindSafe for RequesterPairing
impl Send for RequesterPairing
impl Sync for RequesterPairing
impl Unpin for RequesterPairing
impl UnsafeUnpin for RequesterPairing
impl UnwindSafe for RequesterPairing
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