pub struct SessionPaths {
pub agent_dir: PathBuf,
pub bucket_dir: PathBuf,
}Expand description
Resolved storage locations for a session bucket.
Fields§
§agent_dir: PathBuf~/.capo/agent (or $CAPO_AGENT_DIR).
bucket_dir: PathBuf<agent_dir>/sessions/<encoded-cwd> — one motosan FileSessionStore
per directory; each session id is a file inside.
Implementations§
Source§impl SessionPaths
impl SessionPaths
Sourcepub fn for_cwd(agent_dir: PathBuf, cwd: &Path) -> Self
pub fn for_cwd(agent_dir: PathBuf, cwd: &Path) -> Self
Compute the bucket dir for cwd. Does NOT create the directory.
Sourcepub fn ensure_bucket(&self) -> Result<()>
pub fn ensure_bucket(&self) -> Result<()>
mkdir -p on the bucket dir. Idempotent.
Sourcepub fn sessions_root(&self) -> PathBuf
pub fn sessions_root(&self) -> PathBuf
Root of the sessions/ tree (all buckets sit beneath this).
Trait Implementations§
Source§impl Clone for SessionPaths
impl Clone for SessionPaths
Source§fn clone(&self) -> SessionPaths
fn clone(&self) -> SessionPaths
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SessionPaths
impl RefUnwindSafe for SessionPaths
impl Send for SessionPaths
impl Sync for SessionPaths
impl Unpin for SessionPaths
impl UnsafeUnpin for SessionPaths
impl UnwindSafe for SessionPaths
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