pub trait NetworkEventProcessor: Send + Sync {
// Required methods
fn process_network_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process_network_lost<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process_network_type_changed<'life0, 'async_trait>(
&'life0 self,
is_wifi: bool,
is_cellular: bool,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
网络事件处理器 Trait
定义网络事件的处理逻辑,可由用户自定义实现