#[non_exhaustive]pub enum OperatorEntry {
Init {
hash_algorithm: HashAlgorithm,
key: PublicKey,
},
GrantFlat {
key: PublicKey,
permissions: Vec<Permission>,
},
RevokeFlat {
key_id: KeyID,
permissions: Vec<Permission>,
},
DefineNamespace {
namespace: String,
},
ImportNamespace {
namespace: String,
registry: String,
},
}
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 operator 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.
DefineNamespace
The registry defines a namespace to be used in its own package logs.
ImportNamespace
The registry defines a namespace as imported from another registry.
Implementations§
Source§impl OperatorEntry
impl OperatorEntry
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 OperatorEntry
impl Clone for OperatorEntry
Source§fn clone(&self) -> OperatorEntry
fn clone(&self) -> OperatorEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OperatorEntry
impl Debug for OperatorEntry
Source§impl<'a> From<&'a OperatorEntry> for OperatorEntry
impl<'a> From<&'a OperatorEntry> for OperatorEntry
Source§fn from(entry: &'a OperatorEntry) -> Self
fn from(entry: &'a OperatorEntry) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OperatorEntry
impl PartialEq for OperatorEntry
Source§impl TryFrom<OperatorEntry> for OperatorEntry
impl TryFrom<OperatorEntry> for OperatorEntry
impl Eq for OperatorEntry
impl StructuralPartialEq for OperatorEntry
Auto Trait Implementations§
impl Freeze for OperatorEntry
impl RefUnwindSafe for OperatorEntry
impl Send for OperatorEntry
impl Sync for OperatorEntry
impl Unpin for OperatorEntry
impl UnwindSafe for OperatorEntry
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.