pub trait NetworkChecker {
// Required methods
fn begin(
&mut self,
view: InterfaceView<'_>,
) -> Result<NetworkCheckerOutcome, Error>;
fn resume(
&mut self,
cookie: NetworkCheckCookie,
result: NetworkCheckResult,
) -> Result<NetworkCheckerOutcome, Error>;
}Expand description
A Network Checker is a re-entrant, asynchronous state machine that monitors availability of networks over a given network interface.
Required Methods§
Sourcefn begin(
&mut self,
view: InterfaceView<'_>,
) -> Result<NetworkCheckerOutcome, Error>
fn begin( &mut self, view: InterfaceView<'_>, ) -> Result<NetworkCheckerOutcome, Error>
begin starts a re-entrant, asynchronous network check on the supplied interface. It
returns whether the network check was completed, must be resumed, or if the supplied
interface already had an ongoing network check.
Sourcefn resume(
&mut self,
cookie: NetworkCheckCookie,
result: NetworkCheckResult,
) -> Result<NetworkCheckerOutcome, Error>
fn resume( &mut self, cookie: NetworkCheckCookie, result: NetworkCheckResult, ) -> Result<NetworkCheckerOutcome, Error>
resume continues a network check that was not yet completed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".