Struct wasmer_config::package::NamedPackageIdent
source · 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§fn eq(&self, other: &NamedPackageIdent) -> bool
fn eq(&self, other: &NamedPackageIdent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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<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.