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§

source

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.

source

fn resume( &mut self, cookie: NetworkCheckCookie, result: NetworkCheckResult ) -> Result<NetworkCheckerOutcome, Error>

resume continues a network check that was not yet completed.

Implementors§