pub struct PairingGuard { /* private fields */ }Expand description
Held while a NIP-46 client pairs outside the signer slot. A network switch shuts the client down and marks the pairing aborted; dropping the guard forgets it.
Implementations§
Source§impl PairingGuard
impl PairingGuard
Sourcepub fn aborted(&self) -> bool
pub fn aborted(&self) -> bool
A network switch cut this pairing off: its sockets are closed and it must not be used.
Sourcepub fn install(
self,
nc: NostrConnect,
) -> Result<Option<NostrConnect>, PairingAborted>
pub fn install( self, nc: NostrConnect, ) -> Result<Option<NostrConnect>, PairingAborted>
Install the paired client, returning the signer it replaces. Atomic against a switch: the switch either finds it in the slot or has already aborted (and shut down) the pairing.
Trait Implementations§
Source§impl Drop for PairingGuard
impl Drop for PairingGuard
Auto Trait Implementations§
impl Forget for PairingGuard
impl Freeze for PairingGuard
impl Move for PairingGuard
impl RefUnwindSafe for PairingGuard
impl Send for PairingGuard
impl Sync for PairingGuard
impl Unpin for PairingGuard
impl UnsafeUnpin for PairingGuard
impl UnwindSafe for PairingGuard
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more