pub struct Artifact {
pub kind: ArtifactKind,
pub path: PathBuf,
pub name: String,
pub target: Option<String>,
pub crate_name: String,
pub metadata: HashMap<String, String>,
pub size: Option<u64>,
}Fields§
§kind: ArtifactKind§path: PathBuf§name: StringCanonical artifact name, set at add-time from the path’s filename (trimmed).
target: Option<String>§crate_name: String§metadata: HashMap<String, String>§size: Option<u64>File size in bytes, populated by report_sizes.
Implementations§
Source§impl Artifact
impl Artifact
Sourcepub fn goos(&self) -> Option<String>
pub fn goos(&self) -> Option<String>
Return the OS component of the target (e.g., “linux”, “darwin”, “windows”).
Sourcepub fn goarch(&self) -> Option<String>
pub fn goarch(&self) -> Option<String>
Return the arch component of the target (e.g., “amd64”, “arm64”).
Sourcepub fn only_replacing_unibins(&self) -> bool
pub fn only_replacing_unibins(&self) -> bool
Check if this artifact replaces single-arch variants (universal binary dedup).
OnlyReplacingUnibins — when a universal binary has
replaces=true, it supersedes the per-arch binaries for publisher consumption.
Artifacts without the replaces metadata key default to true (included).
Sourcepub fn extra_binaries(&self) -> Vec<String>
pub fn extra_binaries(&self) -> Vec<String>
Return the list of extra binary names bundled in this archive artifact.
Sourcepub fn extra_binary(&self) -> Option<String>
pub fn extra_binary(&self) -> Option<String>
Return the single binary name for an uploadable binary artifact.
Sourcepub fn ext(&self) -> String
pub fn ext(&self) -> String
Resolve the artifact’s canonical file extension (including the leading
dot), mirroring GoReleaser’s Artifact.Ext() at
internal/artifact/artifact.go:442: prefer the ext metadata extra
when present and non-empty, fall back to parsing the filename.
Stages that know their canonical extension better than filename
parsing can (e.g. srpm knowing .src.rpm rather than .rpm)
populate metadata["ext"] so downstream {{ .ArtifactExt }}
renders the canonical value.