pub struct RepositoryManager {
repositories: Arc<Mutex<HashMap<String, Arc<HybridRepository>>>>,
}Expand description
Repository handle manager
Fields§
§repositories: Arc<Mutex<HashMap<String, Arc<HybridRepository>>>>Implementations§
Source§impl RepositoryManager
impl RepositoryManager
pub fn new() -> Self
pub fn create(&self, handle: String, repository: HybridRepository)
pub fn get(&self, handle: &str) -> Option<Arc<HybridRepository>>
Sourcepub fn handles(&self) -> Vec<String>
pub fn handles(&self) -> Vec<String>
Handles of every live repository.
The background catalog indexer (DR-109) runs outside any command, so it has no handle passed in and needs to discover one. In practice there is a single signed-in repository; returning all of them avoids inventing an “active” concept the rest of the code does not have.
TRACES: UR-065 | DR-109
pub fn destroy(&self, handle: &str)
Auto Trait Implementations§
impl Freeze for RepositoryManager
impl RefUnwindSafe for RepositoryManager
impl Send for RepositoryManager
impl Sync for RepositoryManager
impl Unpin for RepositoryManager
impl UnsafeUnpin for RepositoryManager
impl UnwindSafe for RepositoryManager
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