pub struct SessionContext {
pub session_id: String,
pub session_dir: PathBuf,
pub is_new_session: bool,
/* private fields */
}Expand description
Session context — holds the session ID, directory, and file lock.
Created via resolve_session. The lock is released when the struct is dropped.
Fields§
§session_id: String§session_dir: PathBuf§is_new_session: boolImplementations§
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.
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