alkstore 0.1.0

The alkstore contract crate: one reactive store trait surface — notify, streams, durable queues, TTL locks, outbox, scheduler — implemented by the alkstore-sqlite/-postgres/-mem engine crates; no driver dependencies
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! The boxed-future alias (ADR-008 §2's "desugared boxed-future form"
//! — the family-standard async trait posture): every async trait
//! method crosses the contract as a named future type, keeping the
//! traits object-safe without the `async_trait` macro's erasure.
//!
//! `Send` bounds the future: handles are constructed and polled across
//! `await` points on multi-threaded tokio runtimes, and
//! `Store::begin_tx` returns `Box<dyn TxHandle + Send>` — the futures
//! its methods produce must be equally portable across the runtime's
//! worker threads (SQLite's engine realizes this by round-tripping
//! `spawn_blocking` to the writer thread behind the lease, ADR-003).

use std::future::Future;
use std::pin::Pin;

/// The future type every async contract method returns.
pub type BoxedFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;