pub trait UnpackRef<Id> {
// Required methods
fn unpack_atom_ref(&self) -> Option<(AtomTag, Version, Id)>;
fn find_root_ref(&self) -> Option<Id>;
}
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 tags, versions, and identifiers.
§Reference Format
Atom references follow the pattern: refs/atoms/{tag}/{version}/{id}
where:
tag
is the atom identifier (e.g., “mylib”, “database”)version
is a semantic version (e.g., “1.2.3”)id
is a unique identifier for this atom version
Required Methods§
Sourcefn unpack_atom_ref(&self) -> Option<(AtomTag, Version, Id)>
fn unpack_atom_ref(&self) -> Option<(AtomTag, Version, Id)>
Attempts to unpack this reference as an atom reference.
§Returns
Some((tag, version, id))
if the reference follows atom reference formatNone
if the reference is not an atom reference or is malformed
Sourcefn find_root_ref(&self) -> Option<Id>
fn find_root_ref(&self) -> Option<Id>
placeholder