refactor: dump database to json

This commit is contained in:
mokurin000
2025-07-31 11:25:04 +08:00
parent 3ab53b426d
commit b72addd661
7 changed files with 84 additions and 52 deletions

View File

@@ -6,3 +6,6 @@ mod error;
pub use error::ApiError;
pub use bincode;
#[cfg(all(feature = "compio", feature = "tokio"))]
compile_error!("you must not enable both `compio` and `tokio`");

View File

@@ -74,6 +74,9 @@ pub trait MaiVersionExt: MaiVersion {
#[cfg(feature = "tokio")]
use tokio::task::spawn_blocking;
#[cfg(all(not(feature = "compio"), not(feature = "tokio")))]
compile_error!("you must enable one of `compio` or `tokio`");
async {
let req = spawn_blocking(move || Self::api_call(api, agent_extra, data))
.await