pub struct SessionLookup;Expand description
Stateless namespace for session resolution.
Implementations§
Source§impl SessionLookup
impl SessionLookup
Sourcepub async fn most_recent(paths: &SessionPaths) -> Result<SessionId>
pub async fn most_recent(paths: &SessionPaths) -> Result<SessionId>
--continue / -c — most recent session in paths.bucket_dir,
ranked by motosan SessionMeta::updated_at_ms descending.
Errors if the bucket is empty or doesn’t exist.
Sourcepub async fn resolve(
paths: &SessionPaths,
prefix_or_path: &str,
) -> Result<SessionId>
pub async fn resolve( paths: &SessionPaths, prefix_or_path: &str, ) -> Result<SessionId>
--session <prefix-or-path> — disambiguate:
- Starts with
/,~, or.→ treat as a path to a.jsonlfile. - Else → ULID prefix. Looks in
paths.bucket_dirfirst; if no match there, scans all sibling buckets underpaths.sessions_root(). Errors on 0 or >1 matches.
Auto Trait Implementations§
impl Freeze for SessionLookup
impl RefUnwindSafe for SessionLookup
impl Send for SessionLookup
impl Sync for SessionLookup
impl Unpin for SessionLookup
impl UnsafeUnpin for SessionLookup
impl UnwindSafe for SessionLookup
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