1use std::io::Read;
6
7pub struct AssetFileEntry<'a> {
9 pub path: String,
10 pub reader: Box<dyn Read + 'a>,
11}
12
13#[derive(Debug, Clone)]
15pub struct DeviceInfo {
16 pub brand: String,
17 pub model: String,
18 pub market_name: String,
19 pub os_name: String,
20 pub os_version: String,
21}
22
23#[derive(Debug, Clone, serde::Serialize)]
25pub struct ScreenInfo {
26 pub width: f64,
27 pub height: f64,
28 pub scale: f64,
29}
30
31pub(crate) mod rt;
32pub mod traits;
33
34#[cfg(target_os = "android")]
35mod android;
36
37#[cfg(any(target_os = "ios", target_os = "macos"))]
38mod apple;
39
40#[cfg(target_env = "ohos")]
41pub mod harmony;
42
43#[cfg(any(target_os = "macos", target_os = "windows"))]
44pub mod desktop;
45
46#[cfg(target_os = "android")]
47pub use android::{
48 CachedClass, Platform, get_android_id, get_api_level, has_telephony_feature, init_cached_class,
49 read_external_storage_text, write_external_storage_text,
50};
51
52#[cfg(any(target_os = "ios", target_os = "macos"))]
53pub use apple::Platform;
54
55#[cfg(target_env = "ohos")]
56pub use harmony::Platform;
57
58pub mod error;
59pub use error::*;