pub struct ArtifactsUrl(/* private fields */);Expand description
Registry artifact-base URL. Scheme is restricted to https, http, or
file.
Implementations§
Source§impl ArtifactsUrl
impl ArtifactsUrl
pub fn try_new(raw: &str) -> Result<ArtifactsUrl, SchemaError>
pub fn as_url(&self) -> &Url
Sourcepub fn artifact_url(&self, name: &PluginName, version: &Version) -> Url
pub fn artifact_url(&self, name: &PluginName, version: &Version) -> Url
Computes the fully-resolved artifact URL for (name, version) under
this ArtifactsUrl. Normalizes the base’s trailing slash and preserves
query string and fragment verbatim. The artifact filename is always
{name}-{version}.tar.gz per the flat-layout registry index rule.
Infallible by construction: name/version characters are restricted by
their respective validators to RFC 3986 path-safe ASCII, and the scheme
set accepted by try_new (http, https, file) never satisfies
Url::cannot_be_a_base.
Trait Implementations§
Source§impl Clone for ArtifactsUrl
impl Clone for ArtifactsUrl
Source§fn clone(&self) -> ArtifactsUrl
fn clone(&self) -> ArtifactsUrl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ArtifactsUrl
impl Debug for ArtifactsUrl
Source§impl<'de> Deserialize<'de> for ArtifactsUrl
impl<'de> Deserialize<'de> for ArtifactsUrl
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ArtifactsUrl, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ArtifactsUrl, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ArtifactsUrl
impl Display for ArtifactsUrl
impl Eq for ArtifactsUrl
Source§impl Hash for ArtifactsUrl
impl Hash for ArtifactsUrl
Source§impl PartialEq for ArtifactsUrl
impl PartialEq for ArtifactsUrl
Source§fn eq(&self, other: &ArtifactsUrl) -> bool
fn eq(&self, other: &ArtifactsUrl) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ArtifactsUrl
impl Serialize for ArtifactsUrl
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ArtifactsUrl
Auto Trait Implementations§
impl Freeze for ArtifactsUrl
impl RefUnwindSafe for ArtifactsUrl
impl Send for ArtifactsUrl
impl Sync for ArtifactsUrl
impl Unpin for ArtifactsUrl
impl UnsafeUnpin for ArtifactsUrl
impl UnwindSafe for ArtifactsUrl
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more