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,
impl<P> QlStatus<P>where
P: CheckedPermissions + 'static,
pub fn new(worker: WorkerHandle) -> Self
pub async fn ready(&self)
pub async fn ready(&self)
wait until bluetooth is connected, device is paired, and connection is confirmed as live
pub async fn bt_ready(&self)
pub async fn bt_ready(&self)
wait until bluetooth is connected
pub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
check if fully connected (BT + paired)
pub fn into_inner(self) -> StreamWatch<ConnectionStatus>
Methods from Deref<Target = StreamWatch<ConnectionStatus>>
pub async fn wait_until(&self, predicate: impl FnMut(&T) -> bool)
pub async fn wait_until(&self, predicate: impl FnMut(&T) -> bool)
wait until a predicate is satisfied.
pub fn current(&self) -> T
pub fn current(&self) -> T
get the current value
pub fn borrow(&self) -> Ref<'_, T>
pub fn borrow(&self) -> Ref<'_, T>
borrow the current value
pub async fn next(&mut self) -> Option<T>
pub async fn next(&mut self) -> Option<T>
wait for the next event
Trait Implementations
impl<P: Clone> Clone for QlStatus<P>
impl<P: Clone> Clone for QlStatus<P>
1.0.0fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<P> Deref for QlStatus<P>
impl<P> Deref for QlStatus<P>
type Target = StreamWatch<ConnectionStatus>
type Target = StreamWatch<ConnectionStatus>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
fn deref(&self) -> &Self::Target
Dereferences the value.