pub enum StringFormat {
Show 19 variants
Email,
Url,
Uuid,
Hostname,
Datetime,
Date,
Time,
Duration,
Ipv4,
Ipv6,
Cidrv4,
Cidrv6,
Nanoid,
Cuid,
Cuid2,
Ulid,
Base64,
Emoji,
E164,
}Expand description
The format names, each replicating zod v4’s validator for that format.
Variants§
zod’s practical email: no leading dot, no .., a dotted domain.
Url
What the WHATWG URL constructor accepts, approximated.
Uuid
Versions 1 to 8, plus the nil and max UUIDs.
Hostname
Datetime
An ISO date and time in UTC: a trailing Z is required, seconds are optional.
Date
An ISO date, leap years included.
Time
hh:mm, with optional seconds and fraction.
Duration
An ISO 8601 duration, with weeks only on their own.
Ipv4
Ipv6
Cidrv4
Cidrv6
Nanoid
Cuid
Cuid2
Ulid
Base64
Emoji
E164
An E.164 phone number: +, then 7 to 15 digits.
Implementations§
Trait Implementations§
Source§impl Clone for StringFormat
impl Clone for StringFormat
impl Copy for StringFormat
Source§impl Debug for StringFormat
impl Debug for StringFormat
impl Eq for StringFormat
Source§impl PartialEq for StringFormat
impl PartialEq for StringFormat
impl StructuralPartialEq for StringFormat
Auto Trait Implementations§
impl Freeze for StringFormat
impl RefUnwindSafe for StringFormat
impl Send for StringFormat
impl Sync for StringFormat
impl Unpin for StringFormat
impl UnsafeUnpin for StringFormat
impl UnwindSafe for StringFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
Compare self to
key and return true if they are equal.