1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Persistence adapter contract.
//!
//! Lives in `fluers-runtime` (not `fluers-postgres`) so that [`SessionStore`]
//! can be generic over it. A concrete backend (`fluers-postgres`) implements
//! [`PersistenceAdapter`]; a JSON-file adapter ships in MVP 2 so sessions can
//! resume after a process restart without requiring Postgres.
//!
//! [`SessionStore`]: crate::session::SessionStore
use async_trait;
use Value;
/// The persistence contract for session state.
///
/// The in-memory [`SessionStore`](crate::session::SessionStore) swaps to an
/// impl of this trait when persistence is configured.
/// Errors from the persistence layer.
/// Result alias for persistence operations.
pub type Result<T> = Result;