pub struct ProjectHashRegistry {
pub mappings: HashMap<String, String>,
}Expand description
Registry mapping Gemini projectHash values to known repo roots.
The mapping lives in ~/.aicx/gemini-project-map.json and must be
maintained by the user or by aicx init. A projectHash that is not
in this file cannot resolve to a repo — it stays Opaque.
Fields§
§mappings: HashMap<String, String>Maps projectHash (hex string) → absolute path to project root.
Implementations§
Source§impl ProjectHashRegistry
impl ProjectHashRegistry
Sourcepub fn load_default() -> Self
pub fn load_default() -> Self
Load from the default location (~/.aicx/gemini-project-map.json).
Returns an empty registry if the file doesn’t exist or can’t be parsed.
Sourcepub fn resolve(&self, project_hash: &str) -> Option<TieredIdentity>
pub fn resolve(&self, project_hash: &str) -> Option<TieredIdentity>
Resolve a projectHash to a TieredIdentity by looking up the mapped
path and then inferring repo identity from that path.
Trait Implementations§
Source§impl Clone for ProjectHashRegistry
impl Clone for ProjectHashRegistry
Source§fn clone(&self) -> ProjectHashRegistry
fn clone(&self) -> ProjectHashRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectHashRegistry
impl Debug for ProjectHashRegistry
Source§impl Default for ProjectHashRegistry
impl Default for ProjectHashRegistry
Source§fn default() -> ProjectHashRegistry
fn default() -> ProjectHashRegistry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProjectHashRegistry
impl<'de> Deserialize<'de> for ProjectHashRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProjectHashRegistry
impl RefUnwindSafe for ProjectHashRegistry
impl Send for ProjectHashRegistry
impl Sync for ProjectHashRegistry
impl Unpin for ProjectHashRegistry
impl UnsafeUnpin for ProjectHashRegistry
impl UnwindSafe for ProjectHashRegistry
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