Enum coset::iana::KeyOperation
source · #[non_exhaustive]pub enum KeyOperation {
Sign = 1,
Verify = 2,
Encrypt = 3,
Decrypt = 4,
WrapKey = 5,
UnwrapKey = 6,
DeriveKey = 7,
DeriveBits = 8,
MacCreate = 9,
MacVerify = 10,
}
Expand description
Key operation values.
See RFC 8152 section 7.1 table 4.
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.
Sign = 1
Key is used to create signatures. Requires private key fields.
Verify = 2
Key is used for verification of signatures.
Encrypt = 3
Key is used for key transport encryption.
Decrypt = 4
Key is used for key transport decryption. Requires private key fields.
WrapKey = 5
Key is used for key wrap encryption.
UnwrapKey = 6
Key is used for key wrap decryption. Requires private key fields.
DeriveKey = 7
Key is used for deriving keys. Requires private key fields.
DeriveBits = 8
Key is used for deriving bits not to be used as a key. Requires private key fields.
MacCreate = 9
Key is used for creating MACs.
MacVerify = 10
Key is used for validating MACs.
Trait Implementations§
source§impl Clone for KeyOperation
impl Clone for KeyOperation
source§fn clone(&self) -> KeyOperation
fn clone(&self) -> KeyOperation
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 KeyOperation
impl Debug for KeyOperation
source§impl EnumI64 for KeyOperation
impl EnumI64 for KeyOperation
source§impl Ord for KeyOperation
impl Ord for KeyOperation
source§fn cmp(&self, other: &KeyOperation) -> Ordering
fn cmp(&self, other: &KeyOperation) -> 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 KeyOperation
impl PartialEq for KeyOperation
source§fn eq(&self, other: &KeyOperation) -> bool
fn eq(&self, other: &KeyOperation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for KeyOperation
impl PartialOrd for KeyOperation
source§fn partial_cmp(&self, other: &KeyOperation) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyOperation) -> 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 moreimpl Copy for KeyOperation
impl Eq for KeyOperation
impl StructuralPartialEq for KeyOperation
Auto Trait Implementations§
impl Freeze for KeyOperation
impl RefUnwindSafe for KeyOperation
impl Send for KeyOperation
impl Sync for KeyOperation
impl Unpin for KeyOperation
impl UnwindSafe for KeyOperation
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