#[non_exhaustive]pub enum PackageEntry {
Init {
hash_algorithm: HashAlgorithm,
key: PublicKey,
},
GrantFlat {
key: PublicKey,
permissions: Vec<Permission>,
},
RevokeFlat {
key_id: KeyID,
permissions: Vec<Permission>,
},
Release {
version: Version,
content: AnyHash,
},
Yank {
version: Version,
},
}
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.
Init
Initializes a package log. Must be the first entry of every log and not appear elsewhere.
Fields
§
hash_algorithm: HashAlgorithm
The hash algorithm this log will use for linking
GrantFlat
Grant the specified key a permission. The author of this entry must have the permission.
RevokeFlat
Remove a permission from a key. The author of this entry must have the permission.
Release
Release a version of a package. The version must not have been released yet.
Yank
Yank a version of a package. The version must have been released and not yanked.
Implementations§
Source§impl PackageEntry
impl PackageEntry
Sourcepub fn required_permission(&self) -> Option<Permission>
pub fn required_permission(&self) -> Option<Permission>
Check permission is required to submit this entry
Trait Implementations§
Source§impl Clone for PackageEntry
impl Clone for PackageEntry
Source§fn clone(&self) -> PackageEntry
fn clone(&self) -> PackageEntry
Returns a duplicate 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 PackageEntry
impl Debug for PackageEntry
Source§impl<'a> From<&'a PackageEntry> for PackageEntry
impl<'a> From<&'a PackageEntry> for PackageEntry
Source§fn from(entry: &'a PackageEntry) -> Self
fn from(entry: &'a PackageEntry) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PackageEntry
impl PartialEq for PackageEntry
Source§impl TryFrom<PackageEntry> for PackageEntry
impl TryFrom<PackageEntry> for PackageEntry
impl Eq for PackageEntry
impl StructuralPartialEq for PackageEntry
Auto Trait Implementations§
impl Freeze for PackageEntry
impl RefUnwindSafe for PackageEntry
impl Send for PackageEntry
impl Sync for PackageEntry
impl Unpin for PackageEntry
impl UnwindSafe for PackageEntry
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> 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.