Enum data_plane_api::validate::string_rules::WellKnown
source · [−]pub enum WellKnown {
Email(bool),
Hostname(bool),
Ip(bool),
Ipv4(bool),
Ipv6(bool),
Uri(bool),
UriRef(bool),
Address(bool),
Uuid(bool),
WellKnownRegex(i32),
}
Expand description
WellKnown rules provide advanced constraints against common string patterns
Variants
Email(bool)
Email specifies that the field must be a valid email address as defined by RFC 5322
Hostname(bool)
Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs).
Ip(bool)
Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets.
Ipv4(bool)
Ipv4 specifies that the field must be a valid IPv4 address.
Ipv6(bool)
Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets.
Uri(bool)
Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986
UriRef(bool)
UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.
Address(bool)
Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).
Uuid(bool)
Uuid specifies that the field must be a valid UUID as defined by RFC 4122
WellKnownRegex(i32)
WellKnownRegex specifies a common well known pattern defined as a regex.
Implementations
sourceimpl WellKnown
impl WellKnown
sourcepub fn merge<B>(
field: &mut Option<WellKnown>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>(
field: &mut Option<WellKnown>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations
impl StructuralPartialEq for WellKnown
Auto Trait Implementations
impl RefUnwindSafe for WellKnown
impl Send for WellKnown
impl Sync for WellKnown
impl Unpin for WellKnown
impl UnwindSafe for WellKnown
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request