pub struct State {
pub store: Mutex<Store>,
pub root: PathBuf,
pub sessions: Mutex<HashMap<MergeSessionId, ApiMergeSession>>,
}Fields§
§store: Mutex<Store>§root: PathBufFilesystem root of the store. Held alongside the Store
itself so handlers that need to read store-level files
(e.g. users.json for actor auth) don’t have to round-
trip through the lock.
sessions: Mutex<HashMap<MergeSessionId, ApiMergeSession>>In-memory merge sessions, keyed by MergeSessionId. Sessions
are ephemeral by design (#134 foundation): they live for the
lifetime of the server process and are GC’d on commit. A
future slice can persist them to disk so a session survives
process restarts. For now an agent that gets unlucky with a
restart re-runs merge/start and gets a fresh session.
Implementations§
Auto Trait Implementations§
impl !Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more