pub struct RepoMappingManager { /* private fields */ }
Implementations§
Source§impl RepoMappingManager
impl RepoMappingManager
pub fn new() -> Result<Self>
pub fn load(&self) -> Result<RepoMapping>
pub fn save(&self, mapping: &RepoMapping) -> Result<()>
Sourcepub fn resolve_url(&self, url: &str) -> Result<Option<PathBuf>>
pub fn resolve_url(&self, url: &str) -> Result<Option<PathBuf>>
Resolve a git URL to its local path
Sourcepub fn add_mapping(
&mut self,
url: String,
path: PathBuf,
auto_managed: bool,
) -> Result<()>
pub fn add_mapping( &mut self, url: String, path: PathBuf, auto_managed: bool, ) -> Result<()>
Add a URL-to-path mapping
Sourcepub fn remove_mapping(&mut self, url: &str) -> Result<()>
pub fn remove_mapping(&mut self, url: &str) -> Result<()>
Remove a URL mapping
Sourcepub fn is_auto_managed(&self, url: &str) -> Result<bool>
pub fn is_auto_managed(&self, url: &str) -> Result<bool>
Check if a URL is auto-managed
Sourcepub fn get_default_clone_path(url: &str) -> Result<PathBuf>
pub fn get_default_clone_path(url: &str) -> Result<PathBuf>
Get default clone path for a URL
Sourcepub fn update_sync_time(&mut self, url: &str) -> Result<()>
pub fn update_sync_time(&mut self, url: &str) -> Result<()>
Update last sync time
Auto Trait Implementations§
impl Freeze for RepoMappingManager
impl RefUnwindSafe for RepoMappingManager
impl Send for RepoMappingManager
impl Sync for RepoMappingManager
impl Unpin for RepoMappingManager
impl UnwindSafe for RepoMappingManager
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