lingxia_platform/traits/
network.rs1use crate::error::PlatformError;
2
3pub trait Network: Send + Sync + 'static {
4 fn get_network_info(&self, callback_id: u64) -> Result<(), PlatformError> {
9 let _ = callback_id;
10 Err(PlatformError::Platform(
11 "get_network_info not implemented".to_string(),
12 ))
13 }
14
15 fn add_network_change_listener(&self, callback_id: u64) -> Result<(), PlatformError> {
20 let _ = callback_id;
21 Err(PlatformError::Platform(
22 "add_network_change_listener not implemented".to_string(),
23 ))
24 }
25
26 fn remove_network_change_listener(&self, callback_id: u64) -> Result<(), PlatformError> {
28 let _ = callback_id;
29 Err(PlatformError::Platform(
30 "remove_network_change_listener not implemented".to_string(),
31 ))
32 }
33}