pub struct SessionManager { /* private fields */ }Expand description
Session manager handles persistence and lifecycle.
Implementations§
Source§impl SessionManager
impl SessionManager
Sourcepub fn sessions_root_dir() -> PathBuf
pub fn sessions_root_dir() -> PathBuf
Get the root directory for all sessions ($ATOMCODE_HOME/sessions/).
Sourcepub fn migrate_from_legacy()
pub fn migrate_from_legacy()
Migrate sessions from legacy location to new location. This is a no-op if:
- Not on macOS
- Legacy directory doesn’t exist
- New directory already has sessions
Sourcepub fn new(working_dir: &Path) -> Self
pub fn new(working_dir: &Path) -> Self
Create a new session manager for the given working directory.
Sourcepub fn list(&self) -> Result<Vec<SessionMeta>>
pub fn list(&self) -> Result<Vec<SessionMeta>>
List all sessions for this project (metadata only).
Sourcepub fn has_sessions(&self) -> bool
pub fn has_sessions(&self) -> bool
Check if any sessions exist for this project.
Auto Trait Implementations§
impl Freeze for SessionManager
impl RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
impl UnwindSafe for SessionManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more