Trait ux::prelude::NetworkMonitorExt[]

pub trait NetworkMonitorExt: 'static {
    pub fn can_reach<P, Q>(
        &self,
        connectable: &P,
        cancellable: Option<&Q>
    ) -> Result<(), Error>
    where
        P: IsA<SocketConnectable>,
        Q: IsA<Cancellable>
;
pub fn can_reach_async<P, Q, R>(
        &self,
        connectable: &P,
        cancellable: Option<&Q>,
        callback: R
    )
    where
        P: IsA<SocketConnectable>,
        Q: IsA<Cancellable>,
        R: 'static + FnOnce(Result<(), Error>) + Send
;
pub fn can_reach_async_future<P>(
        &self,
        connectable: &P
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
    where
        P: 'static + IsA<SocketConnectable> + Clone
;
pub fn get_connectivity(&self) -> NetworkConnectivity;
pub fn get_network_available(&self) -> bool;
pub fn get_network_metered(&self) -> bool;
pub fn connect_network_changed<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self, bool)
;
pub fn connect_property_connectivity_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_network_available_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_network_metered_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
; }

Required methods

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

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

pub fn can_reach_async_future<P>(
    &self,
    connectable: &P
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
    P: 'static + IsA<SocketConnectable> + Clone

pub fn get_connectivity(&self) -> NetworkConnectivity

pub fn get_network_available(&self) -> bool

pub fn get_network_metered(&self) -> bool

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

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

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

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

Loading content...

Implementors

impl<O> NetworkMonitorExt for O where
    O: IsA<NetworkMonitor>, 

Loading content...