#[non_exhaustive]pub enum PrepareSignal {
Prepare(PreparePairing),
Cancel(CancelPreparePairing),
}Available on crate feature
connect-server only.Expand description
The “a user is about to pair with you” signal, and its cancellation.
S2C §preparePairing: “It is up to the server implementation to decide what to do with
this signal, but it can be used to display a pop-up with the pairing token in its UI to
improve the user experience.” A device with a screen shows the code at the moment
somebody is looking for it, rather than making them go and find it.
Best effort by design: “When a preparePairing is called, it is not guaranteed that a call to pairingRequest or cancelPreparePairing will follow.” Anything a handler starts needs its own timeout.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Prepare(PreparePairing)
The user has started pairing on the client and wants this node’s code.
Cancel(CancelPreparePairing)
They changed their mind.
Trait Implementations§
Source§impl Clone for PrepareSignal
impl Clone for PrepareSignal
Auto Trait Implementations§
impl Forget for PrepareSignal
impl Freeze for PrepareSignal
impl Move for PrepareSignal
impl RefUnwindSafe for PrepareSignal
impl Send for PrepareSignal
impl Sync for PrepareSignal
impl Unpin for PrepareSignal
impl UnsafeUnpin for PrepareSignal
impl UnwindSafe for PrepareSignal
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