Trait NetworkMonitorExt

Source
pub trait NetworkMonitorExt: 'static {
    // Required methods
    fn can_reach<P: IsA<SocketConnectable>, Q: IsA<Cancellable>>(
        &self,
        connectable: &P,
        cancellable: Option<&Q>,
    ) -> Result<(), Error>;
    fn can_reach_async<P: IsA<SocketConnectable>, Q: IsA<Cancellable>, R: FnOnce(Result<(), Error>) + Send + 'static>(
        &self,
        connectable: &P,
        cancellable: Option<&Q>,
        callback: R,
    );
    fn get_connectivity(&self) -> NetworkConnectivity;
    fn get_network_available(&self) -> bool;
    fn connect_network_changed<F: Fn(&Self, bool) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_connectivity_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_network_available_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
}

Required Methods§

Source

fn can_reach<P: IsA<SocketConnectable>, Q: IsA<Cancellable>>( &self, connectable: &P, cancellable: Option<&Q>, ) -> Result<(), Error>

Source

fn can_reach_async<P: IsA<SocketConnectable>, Q: IsA<Cancellable>, R: FnOnce(Result<(), Error>) + Send + 'static>( &self, connectable: &P, cancellable: Option<&Q>, callback: R, )

Source

fn get_connectivity(&self) -> NetworkConnectivity

Source

fn get_network_available(&self) -> bool

Source

fn connect_network_changed<F: Fn(&Self, bool) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_property_connectivity_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_property_network_available_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§