#[non_exhaustive]pub enum KeyUsage {
Sign,
Verify,
Encrypt,
Decrypt,
WrapKey,
UnwrapKey,
}Available on crate feature
web-crypto and WebAssembly only.Expand description
Key usage category for determining the appropriate algorithm.
This is used by the low-level import_key_for_usage and
import_key_for_usage_with_alg functions to select the correct
WebCrypto algorithm parameters at import time.
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
The key will be used for signing.
Verify
The key will be used for signature verification.
Encrypt
The key will be used for encryption.
Decrypt
The key will be used for decryption.
WrapKey
The key will be used for wrapping other keys.
UnwrapKey
The key will be used for unwrapping other keys.
Trait Implementations§
impl Copy for KeyUsage
impl Eq for KeyUsage
impl StructuralPartialEq for KeyUsage
Auto Trait Implementations§
impl Freeze for KeyUsage
impl RefUnwindSafe for KeyUsage
impl Send for KeyUsage
impl Sync for KeyUsage
impl Unpin for KeyUsage
impl UnsafeUnpin for KeyUsage
impl UnwindSafe for KeyUsage
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.