pub enum PinSpec {
Literal {
project: ProjectName,
tag: TagName,
},
Pattern {
project: ProjectName,
pattern: TagGlob,
select: PinSelect,
},
SelfRef {
project: ProjectName,
git_ref: GitRef,
repo_dir_path: Option<PathBuf>,
},
}Variants§
Literal
Pattern
SelfRef
Self-project pin. git_ref is a branch, tag, or SHA resolved in the
working repo at evaluation time. repo_dir_path, when set, overrides
the CLI --repo-dir-path fallback: needed when one logical project
lives in several physical git directories (one per maintained
branch).
Implementations§
Source§impl PinSpec
impl PinSpec
pub fn literal(project: ProjectName, tag: TagName) -> Self
pub fn pattern( project: ProjectName, pattern: TagGlob, select: PinSelect, ) -> Self
pub fn project(&self) -> &ProjectName
pub fn is_self(&self) -> bool
Sourcepub fn resolve<M>(&self, store: &SnapshotStore<M>) -> Result<Pin, ConfigError>
pub fn resolve<M>(&self, store: &SnapshotStore<M>) -> Result<Pin, ConfigError>
SelfRef pins cannot be resolved here: the working repo lives outside
the snapshot store. The CLI resolves them via the --repo-dir-path
before calling into the evaluation pipeline.
Sourcepub fn self_repo_override(&self) -> Option<&Path>
pub fn self_repo_override(&self) -> Option<&Path>
Some(path) when this pin carries a repo_dir_path override.
Returns None for non-self pins and for self pins that should
fall back to the CLI --repo-dir-path argument.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PinSpec
impl<'de> Deserialize<'de> for PinSpec
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
impl Eq for PinSpec
impl StructuralPartialEq for PinSpec
Auto Trait Implementations§
impl Freeze for PinSpec
impl RefUnwindSafe for PinSpec
impl Send for PinSpec
impl Sync for PinSpec
impl Unpin for PinSpec
impl UnsafeUnpin for PinSpec
impl UnwindSafe for PinSpec
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