:sparkles!: add async-trait dependency for WebAppExt trait

- Add `async_trait` as an optional依赖ency in pmoapp/Cargo.toml
- Enable usage of `#[async_trait]` on WebAppExt trait and its impl for Server
- Guard async-related code with `#[cfg(feature = "pmoserver")]`
This commit is contained in:
2026-04-04 00:34:55 +02:00
parent 6352a43e27
commit d81e7a9413
4 changed files with 14 additions and 1 deletions

View File

@@ -237,6 +237,8 @@
//! - [Vue.js Documentation](https://vuejs.org/)
//! - [Vite Documentation](https://vitejs.dev/)
#[cfg(feature = "pmoserver")]
use async_trait::async_trait;
use rust_embed::RustEmbed;
/// Structure représentant l'application web embarquée.
@@ -285,6 +287,8 @@ pub struct Webapp;
/// }
/// }
/// ```
#[cfg(feature = "pmoserver")]
#[async_trait]
pub trait WebAppExt {
/// Ajoute une Single Page Application au serveur.
///