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>,
&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,
&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,
&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),
F: 'static + Fn(&Self, bool),
pub fn connect_property_connectivity_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self),
F: 'static + Fn(&Self),
pub fn connect_property_network_available_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&Self),
&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),
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&Self),
Implementors
impl<O> NetworkMonitorExt for O where
O: IsA<NetworkMonitor>,
O: IsA<NetworkMonitor>,
pub fn can_reach<P, Q>(
&self,
connectable: &P,
cancellable: Option<&Q>
) -> Result<(), Error> where
P: IsA<SocketConnectable>,
Q: IsA<Cancellable>,
&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,
&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,
&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(&O, bool),
F: 'static + Fn(&O, bool),
pub fn connect_property_connectivity_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
F: 'static + Fn(&O),
pub fn connect_property_network_available_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
pub fn connect_property_network_metered_notify<F>(
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),
&self,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&O),