pub struct RepoConfigManager { /* private fields */ }
Implementations§
Source§impl RepoConfigManager
impl RepoConfigManager
pub fn new(repo_root: PathBuf) -> Self
pub fn load(&self) -> Result<Option<RepoConfig>>
pub fn save(&self, config: &RepoConfig) -> Result<()>
pub fn ensure_default(&self) -> Result<RepoConfig>
pub fn load_desired_state(&self) -> Result<Option<DesiredState>>
pub fn add_mount(&mut self, mount: RequiredMount) -> Result<()>
pub fn remove_mount(&mut self, mount_path: &str) -> Result<bool>
Sourcepub fn load_v2_or_bail(&self) -> Result<RepoConfigV2>
pub fn load_v2_or_bail(&self) -> Result<RepoConfigV2>
Load v2 config or error if it doesn’t exist
Sourcepub fn save_v2(&self, config: &RepoConfigV2) -> Result<()>
pub fn save_v2(&self, config: &RepoConfigV2) -> Result<()>
Save v2 configuration
Sourcepub fn ensure_v2_default(&self) -> Result<RepoConfigV2>
pub fn ensure_v2_default(&self) -> Result<RepoConfigV2>
Ensure v2 config exists, create default if not
Auto Trait Implementations§
impl Freeze for RepoConfigManager
impl RefUnwindSafe for RepoConfigManager
impl Send for RepoConfigManager
impl Sync for RepoConfigManager
impl Unpin for RepoConfigManager
impl UnwindSafe for RepoConfigManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more