pub struct NetworkMonitorHandler<E> { /* private fields */ }Expand description
Network monitor wrapper that debounces unusable transitions.
Implementations§
Source§impl<E> NetworkMonitorHandler<E>
impl<E> NetworkMonitorHandler<E>
Sourcepub fn new(upstream: E) -> Self
pub fn new(upstream: E) -> Self
Create a monitor with the default unusable debounce duration (2 seconds).
Sourcepub fn with_debounce(upstream: E, unusable_debounce: Duration) -> Self
pub fn with_debounce(upstream: E, unusable_debounce: Duration) -> Self
Create a monitor with a custom unusable debounce duration.
Trait Implementations§
Source§impl<E: Clone> Clone for NetworkMonitorHandler<E>
impl<E: Clone> Clone for NetworkMonitorHandler<E>
Source§fn clone(&self) -> NetworkMonitorHandler<E>
fn clone(&self) -> NetworkMonitorHandler<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E> NetworkChangeEffects for NetworkMonitorHandler<E>
impl<E> NetworkChangeEffects for NetworkMonitorHandler<E>
Source§fn subscribe_network_changes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn NetworkChangeStream>, NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_network_changes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn NetworkChangeStream>, NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribe to network change notifications.
Auto Trait Implementations§
impl<E> Freeze for NetworkMonitorHandler<E>where
E: Freeze,
impl<E> RefUnwindSafe for NetworkMonitorHandler<E>where
E: RefUnwindSafe,
impl<E> Send for NetworkMonitorHandler<E>where
E: Send,
impl<E> Sync for NetworkMonitorHandler<E>where
E: Sync,
impl<E> Unpin for NetworkMonitorHandler<E>where
E: Unpin,
impl<E> UnsafeUnpin for NetworkMonitorHandler<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for NetworkMonitorHandler<E>where
E: UnwindSafe,
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