Skip to main content

lingxia_platform/
traits.rs

1use std::future::Future;
2use std::pin::Pin;
3
4use crate::error::PlatformError;
5
6/// A platform operation that finishes asynchronously and reports only success
7/// or failure. Named for its shape rather than for the first caller that
8/// needed one, so a second caller does not have to borrow an unrelated alias.
9pub type PlatformFuture = Pin<Box<dyn Future<Output = Result<(), PlatformError>> + Send + 'static>>;
10
11pub mod app_runtime;
12pub mod device;
13pub mod file;
14pub mod keyboard;
15pub mod location;
16pub mod media_interaction;
17pub mod media_runtime;
18pub mod mouse;
19pub mod network;
20pub mod pull_to_refresh;
21pub mod screenshot;
22pub mod secure_store;
23pub mod share;
24pub mod stream_decoder;
25pub mod ui;
26pub mod update;
27pub mod video_player;
28pub mod wifi;
29
30pub mod prelude {
31    pub use super::app_runtime::AppRuntime;
32    pub use super::device::{Device, DeviceHardware};
33    pub use super::file::FileService;
34    pub use super::keyboard::{
35        AppKeyboard, AppKeyboardAction, AppKeyboardModifier, AppKeyboardRequest,
36    };
37    pub use super::location::Location;
38    pub use super::media_interaction::MediaInteraction;
39    pub use super::media_runtime::MediaRuntime;
40    pub use super::mouse::{AppMouse, AppMouseAction, AppMouseButton, AppMouseRequest};
41    pub use super::network::Network;
42    pub use super::pull_to_refresh::PullToRefresh;
43    pub use super::screenshot::AppScreenshot;
44    pub use super::secure_store::SecureStore;
45    pub use super::share::ShareService;
46    pub use super::ui::{SurfacePresenter, UIUpdate, UserFeedback};
47    pub use super::update::UpdateService;
48    pub use super::video_player::{VideoPlayerHandle, VideoPlayerManager};
49    pub use super::wifi::Wifi;
50}