#[repr(u8)]pub enum BunkerConnectionState {
Idle = 0,
Connecting = 1,
Online = 2,
Offline = 3,
}Expand description
Observable state of the bunker connection. The atomic backs hot-path reads
(e.g. send paths checking “is it safe to issue a sign call?”); state changes
also fan out to the frontend via EventEmitter so the UI can show a banner.
Variants§
Idle = 0
No active bunker session. Either we’re on a local account, or we’re between login and the first successful bootstrap.
Connecting = 1
Currently bootstrapping (relay connect + remote-pubkey discovery).
Online = 2
Bunker is reachable; signing calls should succeed.
Offline = 3
Bunker is unreachable. Hot-path sends will fail fast; the next signing call will retry the underlying NostrConnect path which may reconnect.
Implementations§
Trait Implementations§
Source§impl Clone for BunkerConnectionState
impl Clone for BunkerConnectionState
Source§fn clone(&self) -> BunkerConnectionState
fn clone(&self) -> BunkerConnectionState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BunkerConnectionState
Source§impl Debug for BunkerConnectionState
impl Debug for BunkerConnectionState
impl Eq for BunkerConnectionState
Source§impl PartialEq for BunkerConnectionState
impl PartialEq for BunkerConnectionState
impl StructuralPartialEq for BunkerConnectionState
Auto Trait Implementations§
impl Freeze for BunkerConnectionState
impl RefUnwindSafe for BunkerConnectionState
impl Send for BunkerConnectionState
impl Sync for BunkerConnectionState
impl Unpin for BunkerConnectionState
impl UnsafeUnpin for BunkerConnectionState
impl UnwindSafe for BunkerConnectionState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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