pub struct Identifier {
pub registry: Option<String>,
pub group_id: Option<String>,
pub artifact_id: Option<String>,
pub version: Option<String>,
}Expand description
Represents a parsed identifier in the format registry/group_id/artifact_id@version
Fields§
§registry: Option<String>§group_id: Option<String>§artifact_id: Option<String>§version: Option<String>Implementations§
Source§impl Identifier
impl Identifier
Sourcepub fn parse(input: &str) -> Self
pub fn parse(input: &str) -> Self
Parse an identifier string in the format registry/group_id/artifact_id@version All parts are optional
Sourcepub async fn complete_interactive(
&mut self,
available_registries: &[String],
existing_dependencies: &[DependencyConfig],
registry_client: Option<&RegistryClient>,
) -> Result<()>
pub async fn complete_interactive( &mut self, available_registries: &[String], existing_dependencies: &[DependencyConfig], registry_client: Option<&RegistryClient>, ) -> Result<()>
Complete missing fields by prompting the user with available options
Sourcepub async fn complete_version_with_registry(
&mut self,
registry_client: &RegistryClient,
) -> Result<()>
pub async fn complete_version_with_registry( &mut self, registry_client: &RegistryClient, ) -> Result<()>
Complete the version field by fetching available versions from the registry
Sourcepub async fn validate_artifact_exists(
&self,
registry_client: &RegistryClient,
) -> Result<bool>
pub async fn validate_artifact_exists( &self, registry_client: &RegistryClient, ) -> Result<bool>
Validate that the artifact exists in the registry
Sourcepub fn find_matches<'a>(
&self,
dependencies: &'a [DependencyConfig],
) -> Vec<&'a DependencyConfig>
pub fn find_matches<'a>( &self, dependencies: &'a [DependencyConfig], ) -> Vec<&'a DependencyConfig>
Find dependencies that match this identifier (for removal)
Sourcepub fn to_display_string(&self) -> String
pub fn to_display_string(&self) -> String
Convert to a display string
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all required fields are present
Trait Implementations§
Source§impl Clone for Identifier
impl Clone for Identifier
Source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
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 moreAuto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
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