pub struct SessionContext {
pub session_id: String,
pub session_dir: PathBuf,
pub base_dir: PathBuf,
pub is_new_session: bool,
/* private fields */
}Expand description
Session context — holds the session ID, directory, base directory, and file lock.
Created via resolve_session. The lock is released when the struct is dropped.
Fields§
§session_id: StringSession identifier (user-provided or auto-generated).
session_dir: PathBufPath to the session directory on disk.
base_dir: PathBufBase directory for all session data.
is_new_session: boolWhether this session was just created (vs reused).
Implementations§
Source§impl SessionContext
impl SessionContext
Sourcepub fn session_id_path(&self) -> PathBuf
pub fn session_id_path(&self) -> PathBuf
Path to the session ID marker file.
Sourcepub fn metadata_path(&self) -> PathBuf
pub fn metadata_path(&self) -> PathBuf
Path to the session metadata JSON file.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionContext
impl RefUnwindSafe for SessionContext
impl Send for SessionContext
impl Sync for SessionContext
impl Unpin for SessionContext
impl UnsafeUnpin for SessionContext
impl UnwindSafe for SessionContext
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