pub struct PublishConfig {
pub name: String,
pub input_path: String,
pub version: String,
pub registry: String,
pub group_id: Option<String>,
pub artifact_id: Option<String>,
pub type: Option<ArtifactType>,
pub if_exists: IfExistsAction,
pub description: Option<String>,
pub labels: HashMap<String, String>,
pub references: Vec<ArtifactReference>,
}Expand description
Publishing configuration for uploading artifacts to registries
Defines how local artifacts should be published to registries, including metadata, references, and conflict resolution behavior.
Fields§
§name: StringName/identifier for this publish configuration
input_path: StringLocal path to the file to publish
version: StringExact version to publish (no semver ranges allowed)
registry: StringTarget registry name
group_id: Option<String>Group ID (defaults from name if contains /)
artifact_id: Option<String>Artifact ID (defaults from name)
type: Option<ArtifactType>Artifact type (auto-detected from file extension if not specified)
if_exists: IfExistsActionBehavior when artifact already exists
description: Option<String>Human-readable description
labels: HashMap<String, String>Key-value labels for metadata
references: Vec<ArtifactReference>References to other artifacts
Implementations§
Source§impl PublishConfig
impl PublishConfig
Sourcepub fn resolved_group_id(&self) -> String
pub fn resolved_group_id(&self) -> String
Get the resolved group ID for this publish configuration
If group_id is explicitly set, uses that value. Otherwise:
- If
namecontains ‘/’, uses the part before ‘/’ as group ID - Otherwise defaults to “default”
§Examples
- name: “com.example/my-service” → group_id: “com.example”
- name: “my-service” → group_id: “default”
pub fn resolved_artifact_id(&self) -> String
pub fn resolved_content_type(&self) -> String
pub fn resolved_artifact_type(&self) -> String
Trait Implementations§
Source§impl Clone for PublishConfig
impl Clone for PublishConfig
Source§fn clone(&self) -> PublishConfig
fn clone(&self) -> PublishConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PublishConfig
impl Debug for PublishConfig
Source§impl<'de> Deserialize<'de> for PublishConfig
impl<'de> Deserialize<'de> for PublishConfig
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
Auto Trait Implementations§
impl Freeze for PublishConfig
impl RefUnwindSafe for PublishConfig
impl Send for PublishConfig
impl Sync for PublishConfig
impl Unpin for PublishConfig
impl UnwindSafe for PublishConfig
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