Trait UnpackRef

Source
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§

Source

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 format
  • None if the reference is not an atom reference or is malformed
Source

fn find_root_ref(&self) -> Option<Id>

placeholder

Implementations on Foreign Types§

Source§

impl UnpackRef<ObjectId> for Ref

Source§

fn unpack_atom_ref(&self) -> Option<(AtomTag, Version, ObjectId)>

Source§

fn find_root_ref(&self) -> Option<ObjectId>

Implementors§