Enum google_api_proto::google::api::field_info::Format
source · #[repr(i32)]pub enum Format {
Unspecified = 0,
Uuid4 = 1,
Ipv4 = 2,
Ipv6 = 3,
Ipv4OrIpv6 = 4,
}
Expand description
The standard format of a field value. The supported formats are all backed by either an RFC defined by the IETF or a Google-defined AIP.
Variants§
Unspecified = 0
Default, unspecified value.
Uuid4 = 1
Universally Unique Identifier, version 4, value as defined by
https://datatracker.ietf.org/doc/html/rfc4122. The value may be
normalized to entirely lowercase letters. For example, the value
F47AC10B-58CC-0372-8567-0E02B2C3D479
would be normalized to
f47ac10b-58cc-0372-8567-0e02b2c3d479
.
Ipv4 = 2
Internet Protocol v4 value as defined by RFC
791. The value may be
condensed, with leading zeros in each octet stripped. For example,
001.022.233.040
would be condensed to 1.22.233.40
.
Ipv6 = 3
Internet Protocol v6 value as defined by RFC
2460. The value may be
normalized to entirely lowercase letters with zeros compressed, following
RFC 5952. For example,
the value 2001:0DB8:0::0
would be normalized to 2001:db8::
.
Ipv4OrIpv6 = 4
An IP address in either v4 or v6 format as described by the individual values defined herein. See the comments on the IPV4 and IPV6 types for allowed normalizations of each.
Implementations§
source§impl Format
impl Format
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 Ord for Format
impl Ord for Format
source§impl PartialEq for Format
impl PartialEq for Format
source§impl PartialOrd for Format
impl PartialOrd for Format
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 Format
impl TryFrom<i32> for Format
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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