sessions_core/lib.rs
1//! Sessions Core
2
3#![forbid(unsafe_code)]
4
5/// Set if the session was unchanged or inited.
6pub const UNCHANGED: u8 = 0;
7
8/// Set if the session has been destroied.
9pub const PURGED: u8 = 1;
10
11/// Set if the session has been renewed.
12pub const RENEWED: u8 = 2;
13
14/// Set if the session has been changed.
15pub const CHANGED: u8 = 3;
16
17/// A data state
18pub type Data = std::collections::BTreeMap<String, serde_json::Value>;
19
20mod state;
21pub use state::State;
22
23mod storage;
24pub use storage::Storage;
25
26mod store;
27pub use store::Store;
28
29pub use serde_json::Value;
30
31#[cfg(feature = "session")]
32mod session;
33#[cfg(feature = "session")]
34pub use session::Session;