pub struct NamedPackageIdent {
pub registry: Option<String>,
pub namespace: Option<String>,
pub name: String,
pub tag: Option<Tag>,
}
Expand description
Parsed representation of a package identifier.
Format:
[https?://
Fields§
§registry: Option<String>
§namespace: Option<String>
§name: String
§tag: Option<Tag>
Implementations§
Source§impl NamedPackageIdent
impl NamedPackageIdent
pub fn try_from_full_name_and_version( full_name: &str, version: &str, ) -> Result<Self, PackageParseError>
pub fn tag_str(&self) -> Option<String>
pub fn version_opt(&self) -> Option<&VersionReq>
pub fn version_or_default(&self) -> VersionReq
pub fn registry_url(&self) -> Result<Option<Url>, PackageParseError>
Sourcepub fn build_identifier(&self) -> String
pub fn build_identifier(&self) -> String
Build the ident for a package.
Format: [NAMESPACE/]NAME[@tag]
pub fn build(&self) -> String
Trait Implementations§
Source§impl Clone for NamedPackageIdent
impl Clone for NamedPackageIdent
Source§fn clone(&self) -> NamedPackageIdent
fn clone(&self) -> NamedPackageIdent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NamedPackageIdent
impl Debug for NamedPackageIdent
Source§impl<'de> Deserialize<'de> for NamedPackageIdent
impl<'de> Deserialize<'de> for NamedPackageIdent
Source§fn deserialize<D>(deserializer: D) -> Result<NamedPackageIdent, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<NamedPackageIdent, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NamedPackageIdent
impl Display for NamedPackageIdent
Source§impl From<NamedPackageId> for NamedPackageIdent
impl From<NamedPackageId> for NamedPackageIdent
Source§fn from(value: NamedPackageId) -> Self
fn from(value: NamedPackageId) -> Self
Converts to this type from the input type.
Source§impl From<NamedPackageIdent> for PackageIdent
impl From<NamedPackageIdent> for PackageIdent
Source§fn from(value: NamedPackageIdent) -> Self
fn from(value: NamedPackageIdent) -> Self
Converts to this type from the input type.
Source§impl From<NamedPackageIdent> for PackageSource
impl From<NamedPackageIdent> for PackageSource
Source§fn from(value: NamedPackageIdent) -> Self
fn from(value: NamedPackageIdent) -> Self
Converts to this type from the input type.
Source§impl FromStr for NamedPackageIdent
impl FromStr for NamedPackageIdent
Source§impl Hash for NamedPackageIdent
impl Hash for NamedPackageIdent
Source§impl JsonSchema for NamedPackageIdent
impl JsonSchema for NamedPackageIdent
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl PartialEq for NamedPackageIdent
impl PartialEq for NamedPackageIdent
Source§impl Serialize for NamedPackageIdent
impl Serialize for NamedPackageIdent
impl Eq for NamedPackageIdent
impl StructuralPartialEq for NamedPackageIdent
Auto Trait Implementations§
impl Freeze for NamedPackageIdent
impl RefUnwindSafe for NamedPackageIdent
impl Send for NamedPackageIdent
impl Sync for NamedPackageIdent
impl Unpin for NamedPackageIdent
impl UnwindSafe for NamedPackageIdent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.