pub struct Store { /* private fields */ }Expand description
Where stack definitions live: $XDG_STATE_HOME/isb (else
~/.local/state/isb), one 0600 file per stack under stacks/.
Implementations§
Source§impl Store
impl Store
pub fn default_dir() -> PathBuf
pub fn open(dir: impl Into<PathBuf>) -> Result<Store>
pub fn dir(&self) -> &Path
pub fn load_all(&self) -> Result<Vec<StackDef>>
Sourcepub fn save(&self, def: &StackDef) -> Result<()>
pub fn save(&self, def: &StackDef) -> Result<()>
Write atomically (temp file, fsync, rename), so a crash never leaves half a stack behind.
pub fn remove(&self, org: &OrgId, name: &str) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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