Be aware: Foundation will NEVER ask for your seed words, device PIN, or call you unexpectedly. If anyone does, it's a scam.

Struct

QlStatus

pub struct QlStatus<P> { /* private fields */ }
Expand description

reactive handle to latest QuantumLink status

Implementations

impl<P> QlStatus<P>
where P: CheckedPermissions + 'static,

pub fn new(worker: WorkerHandle) -> Self
where P: MessageAllowed<SubscribeConnectionStatus> + 'static,

Permission: os/quantum-link / SubscribeConnectionStatus

Permission group: network-and-pairing.status-and-rates

Required signature: thirdParty

Approval: autoAllow

pub async fn ready(&self)

Permission: not needed

wait until bluetooth is connected, device is paired, and connection is confirmed as live

pub async fn bt_ready(&self)

Permission: not needed

wait until bluetooth is connected

pub fn is_connected(&self) -> bool

Permission: not needed

check if fully connected (BT + paired)

pub fn into_inner(self) -> StreamWatch<ConnectionStatus>

Permission: not needed

Methods from Deref<Target = StreamWatch<ConnectionStatus>>

pub async fn wait_until(&self, predicate: impl FnMut(&T) -> bool)

wait until a predicate is satisfied.

pub fn current(&self) -> T

get the current value

pub fn borrow(&self) -> Ref<'_, T>

borrow the current value

pub async fn next(&mut self) -> Option<T>

wait for the next event

Trait Implementations

impl<P: Clone> Clone for QlStatus<P>

fn clone(&self) -> QlStatus<P>

Returns a duplicate of the value. Read more
1.0.0

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl<P> Deref for QlStatus<P>

type Target = StreamWatch<ConnectionStatus>

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target

Dereferences the value.

impl<P> DerefMut for QlStatus<P>

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations

impl<P> Freeze for QlStatus<P>

impl<P> RefUnwindSafe for QlStatus<P>

impl<P> Send for QlStatus<P>

impl<P> Sync for QlStatus<P>

impl<P> Unpin for QlStatus<P>

impl<P> UnsafeUnpin for QlStatus<P>

impl<P> UnwindSafe for QlStatus<P>