#[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
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
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 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§impl PartialOrd for PackageHash
impl PartialOrd for PackageHash
Source§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§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> 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.