pub struct State { /* private fields */ }Implementations§
Source§impl State
impl State
Sourcepub fn load(base: &Path) -> Result<Self>
pub fn load(base: &Path) -> Result<Self>
Loads <base>/state.toml. Missing file yields empty state.
On first run, migrates current_context or legacy default_context from
config.toml if present, then writes state.toml.
pub fn current_context(&self) -> Option<&str>
pub fn set_current_context(&mut self, name: Option<String>) -> Result<()>
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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