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
is split across 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: StoreMode>(
&self,
store: &SnapshotStore<M>,
) -> Result<Pin, ConfigError>
pub fn resolve<M: StoreMode>( &self, store: &SnapshotStore<M>, ) -> Result<Pin, ConfigError>
SelfRef pins cannot be resolved here: the working repo is outside
the snapshot store. The CLI resolves them via the --repo-dir-path
before calling into the evaluation pipeline.
Sourcepub fn as_self_pin(&self) -> Option<SelfPin<'_>>
pub fn as_self_pin(&self) -> Option<SelfPin<'_>>
Some with the self-ref payload for a SelfRef spec, None for
Literal and Pattern, which have no repo to resolve against.
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 Forget for PinSpec
impl Freeze for PinSpec
impl Move 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