pub struct SpoolLayout { /* private fields */ }Expand description
Resolves all standard paths under ~/.spool/. Use SpoolLayout::resolve
to construct from $HOME, or SpoolLayout::from_root for testing with
a custom root.
Implementations§
Source§impl SpoolLayout
impl SpoolLayout
Sourcepub fn from_root(root: PathBuf) -> Self
pub fn from_root(root: PathBuf) -> Self
Construct from an explicit root directory. Useful for tests.
Sourcepub fn plugins_dir(&self) -> PathBuf
pub fn plugins_dir(&self) -> PathBuf
~/.spool/plugins/ — empty in OSS, populated by Pro installer.
Sourcepub fn version_file(&self) -> PathBuf
pub fn version_file(&self) -> PathBuf
~/.spool/version.json — bootstrap state marker.
Sourcepub fn config_file(&self) -> PathBuf
pub fn config_file(&self) -> PathBuf
~/.spool/data/config.toml — primary config file.
Sourcepub fn ledger_file(&self) -> PathBuf
pub fn ledger_file(&self) -> PathBuf
~/.spool/data/memory-ledger.jsonl — append-only ledger.
Sourcepub fn binary_path(&self, name: &str) -> PathBuf
pub fn binary_path(&self, name: &str) -> PathBuf
Path of a binary inside bin/. Adds .exe on Windows automatically.
Sourcepub fn ensure_dirs(&self) -> Result<()>
pub fn ensure_dirs(&self) -> Result<()>
Create all standard directories. Idempotent.
Trait Implementations§
Source§impl Clone for SpoolLayout
impl Clone for SpoolLayout
Source§fn clone(&self) -> SpoolLayout
fn clone(&self) -> SpoolLayout
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 SpoolLayout
impl RefUnwindSafe for SpoolLayout
impl Send for SpoolLayout
impl Sync for SpoolLayout
impl Unpin for SpoolLayout
impl UnsafeUnpin for SpoolLayout
impl UnwindSafe for SpoolLayout
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