pub struct Config {
pub home: PathBuf,
pub state: PathBuf,
pub lock: PathBuf,
pub staging: PathBuf,
}Fields§
§home: PathBuf§state: PathBuf§lock: PathBuf§staging: PathBufImplementations§
Source§impl Config
impl Config
pub fn from_home(home: impl AsRef<Path>) -> Result<Self, StateError>
pub fn load() -> Result<Self, StateError>
pub fn user_backend(&self) -> Result<Option<String>, StateError>
Sourcepub fn user_config(&self) -> Result<UserConfig, StateError>
pub fn user_config(&self) -> Result<UserConfig, StateError>
config.json: v1 names a default backend; v2 may add a default cache profile.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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