: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

@@ -27,10 +27,14 @@
//! # }
//! ```
#[cfg(feature = "pmoserver")]
use async_trait::async_trait;
use crate::WebAppExt;
use pmoserver::Server;
use rust_embed::RustEmbed;
#[cfg(feature = "pmoserver")]
#[async_trait]
impl WebAppExt for Server {
async fn add_webapp<W>(&mut self, path: &str)
where