Trait sc_network::service::traits::NetworkStatusProvider
source · pub trait NetworkStatusProvider {
// Required methods
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkStatus, ()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn network_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkState, ()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Provides high-level status information about network.
Required Methods§
sourcefn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkStatus, ()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkStatus, ()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
High-level network status information.
Returns an error if the NetworkWorker
is no longer running.
sourcefn network_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkState, ()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn network_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkState, ()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the network state.
Returns an error if the NetworkWorker
is no longer running.