pub trait UnpackRef<Id, R> {
// Required methods
fn unpack_atom_ref(&self, root: Option<&R>) -> Option<UnpackedRef<Id, R>>;
fn find_root_ref(&self) -> Option<R>;
}Expand description
A trait for unpacking atom references into structured version information.
This trait defines how to parse atom references (from git refs) into structured atom data including labels, versions, and identifiers.
§Reference Format
Atom references follow the pattern: refs/ekala/atoms/{label}/{version}
where:
labelis the atom identifier (e.g., “mylib”, “database”)versionis a semantic version (e.g., “1.2.3”)
Required Methods§
Sourcefn unpack_atom_ref(&self, root: Option<&R>) -> Option<UnpackedRef<Id, R>>
fn unpack_atom_ref(&self, root: Option<&R>) -> Option<UnpackedRef<Id, R>>
Attempts to unpack this reference as an atom reference.
§Returns
Some((label, version, id))if the reference follows atom reference formatNoneif the reference is not an atom reference or is malformed
Sourcefn find_root_ref(&self) -> Option<R>
fn find_root_ref(&self) -> Option<R>
Attempts to find the root reference in the store.