pub struct Package {
pub namespace: String,
pub name: String,
pub version: Option<String>,
}Fields§
§namespace: String§name: String§version: Option<String>Implementations§
Source§impl Package
impl Package
Sourcepub fn already_installed(&self, wasmer_dir: &Path) -> Option<PathBuf>
pub fn already_installed(&self, wasmer_dir: &Path) -> Option<PathBuf>
Checks whether the package is already installed, if yes, returns the path to the root dir
Sourcepub fn is_url_already_installed(url: &Url, wasmer_dir: &Path) -> Option<PathBuf>
pub fn is_url_already_installed(url: &Url, wasmer_dir: &Path) -> Option<PathBuf>
Checks if the URL is already installed, note that {url}@{version}
and {url} are treated the same
Sourcepub fn hash_url(url: &str) -> String
pub fn hash_url(url: &str) -> String
Returns the hash of the URL with a maximum of 128 bytes length (necessary for not erroring on filesystem limitations)
Sourcepub fn unhash_url(hashed: &str) -> String
pub fn unhash_url(hashed: &str) -> String
Returns the hash of the URL with a maximum of 64 bytes length
Sourcepub fn get_hash(&self, registry: &str) -> String
pub fn get_hash(&self, registry: &str) -> String
Returns the hash of the package URL without the version (because the version is encoded as @version and isn’t part of the hash itself)
Trait Implementations§
Source§impl Ord for Package
impl Ord for Package
Source§impl PartialOrd for Package
impl PartialOrd for Package
impl Eq for Package
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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§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<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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.