#[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<Format>
pub fn from_str_name(value: &str) -> Option<Format>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for Format
impl Ord for Format
Source§impl PartialOrd for Format
impl PartialOrd for Format
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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