Enum google_api_proto::google::cloud::kms::v1::crypto_key::CryptoKeyPurpose
source · #[repr(i32)]pub enum CryptoKeyPurpose {
Unspecified = 0,
EncryptDecrypt = 1,
AsymmetricSign = 5,
AsymmetricDecrypt = 6,
RawEncryptDecrypt = 7,
Mac = 9,
}
Expand description
[CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] describes the cryptographic capabilities of a [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used for the operations allowed by its purpose. For more information, see Key purposes.
Variants§
Unspecified = 0
Not specified.
EncryptDecrypt = 1
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
AsymmetricSign = 5
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
AsymmetricDecrypt = 6
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
RawEncryptDecrypt = 7
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt] and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt]. This purpose is meant to be used for interoperable symmetric encryption and does not support automatic CryptoKey rotation.
Mac = 9
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
Implementations§
source§impl CryptoKeyPurpose
impl CryptoKeyPurpose
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for CryptoKeyPurpose
impl Clone for CryptoKeyPurpose
source§fn clone(&self) -> CryptoKeyPurpose
fn clone(&self) -> CryptoKeyPurpose
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CryptoKeyPurpose
impl Debug for CryptoKeyPurpose
source§impl Default for CryptoKeyPurpose
impl Default for CryptoKeyPurpose
source§fn default() -> CryptoKeyPurpose
fn default() -> CryptoKeyPurpose
source§impl From<CryptoKeyPurpose> for i32
impl From<CryptoKeyPurpose> for i32
source§fn from(value: CryptoKeyPurpose) -> i32
fn from(value: CryptoKeyPurpose) -> i32
source§impl Hash for CryptoKeyPurpose
impl Hash for CryptoKeyPurpose
source§impl Ord for CryptoKeyPurpose
impl Ord for CryptoKeyPurpose
source§fn cmp(&self, other: &CryptoKeyPurpose) -> Ordering
fn cmp(&self, other: &CryptoKeyPurpose) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for CryptoKeyPurpose
impl PartialEq for CryptoKeyPurpose
source§fn eq(&self, other: &CryptoKeyPurpose) -> bool
fn eq(&self, other: &CryptoKeyPurpose) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CryptoKeyPurpose
impl PartialOrd for CryptoKeyPurpose
source§fn partial_cmp(&self, other: &CryptoKeyPurpose) -> Option<Ordering>
fn partial_cmp(&self, other: &CryptoKeyPurpose) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for CryptoKeyPurpose
impl TryFrom<i32> for CryptoKeyPurpose
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<CryptoKeyPurpose, UnknownEnumValue>
fn try_from(value: i32) -> Result<CryptoKeyPurpose, UnknownEnumValue>
impl Copy for CryptoKeyPurpose
impl Eq for CryptoKeyPurpose
impl StructuralPartialEq for CryptoKeyPurpose
Auto Trait Implementations§
impl Freeze for CryptoKeyPurpose
impl RefUnwindSafe for CryptoKeyPurpose
impl Send for CryptoKeyPurpose
impl Sync for CryptoKeyPurpose
impl Unpin for CryptoKeyPurpose
impl UnwindSafe for CryptoKeyPurpose
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
§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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request