global: snapshot

This commit is contained in:
nym21
2025-10-26 22:30:41 +01:00
parent 7d01e9e91e
commit 82e59d409e
34 changed files with 2192 additions and 1090 deletions

View File

@@ -0,0 +1,18 @@
// Should be async
// anything related to IO should use
//
// Sync function
// fn get(db: &CandyStore, key: &str) -> Option<Vec<u8>> {
// db.get(key).ok().flatten()
// }
use crate::Query;
// // Async function
// async fn get_async(db: Arc<CandyStore>, key: String) -> Option<Vec<u8>> {
// tokio::task::spawn_blocking(move || {
// db.get(&key).ok().flatten()
// }).await.ok()?
// }
#[derive(Clone)]
pub struct AsyncQuery(Query);

View File

@@ -13,6 +13,7 @@ use brk_types::{
};
use vecdb::{AnyCollectableVec, AnyStoredVec};
mod r#async;
mod chain;
mod deser;
mod output;
@@ -20,6 +21,7 @@ mod pagination;
mod params;
mod vecs;
pub use r#async::*;
pub use output::{Output, Value};
pub use pagination::{PaginatedIndexParam, PaginatedMetrics, PaginationParam};
pub use params::{Params, ParamsDeprec, ParamsOpt};