Enum google_api_proto::google::cloud::iot::v1::PublicKeyFormat
source · #[repr(i32)]pub enum PublicKeyFormat {
UnspecifiedPublicKeyFormat = 0,
RsaPem = 3,
RsaX509Pem = 1,
Es256Pem = 2,
Es256X509Pem = 4,
}
Expand description
The supported formats for the public key.
Variants§
UnspecifiedPublicKeyFormat = 0
The format has not been specified. This is an invalid default value and must not be used.
RsaPem = 3
An RSA public key encoded in base64, and wrapped by
-----BEGIN PUBLIC KEY-----
and -----END PUBLIC KEY-----
. This can be
used to verify RS256
signatures in JWT tokens (RFC7518).
RsaX509Pem = 1
As RSA_PEM, but wrapped in an X.509v3 certificate (RFC5280), encoded in base64, and wrapped by
-----BEGIN CERTIFICATE-----
and -----END CERTIFICATE-----
.
Es256Pem = 2
Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in
base64, and wrapped by -----BEGIN PUBLIC KEY-----
and -----END PUBLIC KEY-----
. This can be used to verify JWT tokens with the ES256
algorithm (RFC7518). This curve is
defined in OpenSSL as the prime256v1
curve.
Es256X509Pem = 4
As ES256_PEM, but wrapped in an X.509v3 certificate (RFC5280), encoded in base64, and wrapped by
-----BEGIN CERTIFICATE-----
and -----END CERTIFICATE-----
.
Implementations§
source§impl PublicKeyFormat
impl PublicKeyFormat
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 PublicKeyFormat
impl Clone for PublicKeyFormat
source§fn clone(&self) -> PublicKeyFormat
fn clone(&self) -> PublicKeyFormat
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PublicKeyFormat
impl Debug for PublicKeyFormat
source§impl Default for PublicKeyFormat
impl Default for PublicKeyFormat
source§fn default() -> PublicKeyFormat
fn default() -> PublicKeyFormat
source§impl From<PublicKeyFormat> for i32
impl From<PublicKeyFormat> for i32
source§fn from(value: PublicKeyFormat) -> i32
fn from(value: PublicKeyFormat) -> i32
source§impl Hash for PublicKeyFormat
impl Hash for PublicKeyFormat
source§impl Ord for PublicKeyFormat
impl Ord for PublicKeyFormat
source§fn cmp(&self, other: &PublicKeyFormat) -> Ordering
fn cmp(&self, other: &PublicKeyFormat) -> 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 PublicKeyFormat
impl PartialEq for PublicKeyFormat
source§fn eq(&self, other: &PublicKeyFormat) -> bool
fn eq(&self, other: &PublicKeyFormat) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PublicKeyFormat
impl PartialOrd for PublicKeyFormat
source§fn partial_cmp(&self, other: &PublicKeyFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &PublicKeyFormat) -> 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 PublicKeyFormat
impl TryFrom<i32> for PublicKeyFormat
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<PublicKeyFormat, UnknownEnumValue>
fn try_from(value: i32) -> Result<PublicKeyFormat, UnknownEnumValue>
impl Copy for PublicKeyFormat
impl Eq for PublicKeyFormat
impl StructuralPartialEq for PublicKeyFormat
Auto Trait Implementations§
impl Freeze for PublicKeyFormat
impl RefUnwindSafe for PublicKeyFormat
impl Send for PublicKeyFormat
impl Sync for PublicKeyFormat
impl Unpin for PublicKeyFormat
impl UnwindSafe for PublicKeyFormat
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