Enum wasmer_config::package::PackageHash
source · #[non_exhaustive]pub enum PackageHash {
Sha256(Sha256Hash),
}
Expand description
Hash for a package.
Currently only supports the format: sha256:<hash>
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sha256(Sha256Hash)
Implementations§
source§impl PackageHash
impl PackageHash
const SHA256_STR_PREFIX: &'static str = "sha256:"
pub fn as_sha256(&self) -> Option<&Sha256Hash>
pub fn from_sha256_bytes(bytes: [u8; 32]) -> Self
Trait Implementations§
source§impl Clone for PackageHash
impl Clone for PackageHash
source§fn clone(&self) -> PackageHash
fn clone(&self) -> PackageHash
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 PackageHash
impl Debug for PackageHash
source§impl<'de> Deserialize<'de> for PackageHash
impl<'de> Deserialize<'de> for PackageHash
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PackageHash
impl Display for PackageHash
source§impl From<PackageHash> for PackageId
impl From<PackageHash> for PackageId
source§fn from(value: PackageHash) -> Self
fn from(value: PackageHash) -> Self
Converts to this type from the input type.
source§impl From<PackageHash> for PackageIdent
impl From<PackageHash> for PackageIdent
source§fn from(value: PackageHash) -> Self
fn from(value: PackageHash) -> Self
Converts to this type from the input type.
source§impl From<PackageHash> for PackageSource
impl From<PackageHash> for PackageSource
source§fn from(value: PackageHash) -> Self
fn from(value: PackageHash) -> Self
Converts to this type from the input type.
source§impl From<Sha256Hash> for PackageHash
impl From<Sha256Hash> for PackageHash
source§fn from(value: Sha256Hash) -> Self
fn from(value: Sha256Hash) -> Self
Converts to this type from the input type.
source§impl FromStr for PackageHash
impl FromStr for PackageHash
source§impl Hash for PackageHash
impl Hash for PackageHash
source§impl JsonSchema for PackageHash
impl JsonSchema for PackageHash
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
§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 Ord for PackageHash
impl Ord for PackageHash
source§fn cmp(&self, other: &PackageHash) -> Ordering
fn cmp(&self, other: &PackageHash) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for PackageHash
impl PartialEq for PackageHash
source§fn eq(&self, other: &PackageHash) -> bool
fn eq(&self, other: &PackageHash) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PackageHash
impl PartialOrd for PackageHash
source§fn partial_cmp(&self, other: &PackageHash) -> Option<Ordering>
fn partial_cmp(&self, other: &PackageHash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for PackageHash
impl Serialize for PackageHash
impl Eq for PackageHash
impl StructuralPartialEq for PackageHash
Auto Trait Implementations§
impl Freeze for PackageHash
impl RefUnwindSafe for PackageHash
impl Send for PackageHash
impl Sync for PackageHash
impl Unpin for PackageHash
impl UnwindSafe for PackageHash
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.