pub enum WellKnown {
Email(bool),
Ip(bool),
Ipv4(bool),
Ipv6(bool),
Uuid(bool),
Hostname(bool),
Uri(bool),
}
Variants§
Email(bool)
Ensure the value is a valid email address format
Ip(bool)
Requires the input value to be a valid ipv4 or ipv6 address.
Ipv4(bool)
Requires the input value to be a valid ipv4 address.
Ipv6(bool)
Requires the input value to be a valid ipv6 address.
Uuid(bool)
Requires the input value to be a valid uuid.
Hostname(bool)
Requires the input value to be a valid hostname.
Uri(bool)
Requires the input value to be a valid uri.
Implementations§
Source§impl WellKnown
impl WellKnown
Sourcepub fn merge(
field: &mut Option<WellKnown>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<WellKnown>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
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 Copy for WellKnown
impl StructuralPartialEq for WellKnown
Auto Trait Implementations§
impl Freeze for WellKnown
impl RefUnwindSafe for WellKnown
impl Send for WellKnown
impl Sync for WellKnown
impl Unpin for WellKnown
impl UnwindSafe for WellKnown
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
Mutably borrows from an owned value. Read more