pub enum Format {
Show 45 variants
Uuid,
DateTime,
Date,
Time,
HexString(usize),
Base64String(usize),
JwtToken,
CreditCardNumber,
SocialSecurityNumber,
IpAddress,
MacAddress,
ColorHex,
Oklch,
Filename(String),
Url(String),
CurrencyAmount,
Percentage,
Latitude,
Longitude,
CompanyName,
JobTitle,
StreetAddress,
City,
State,
PostalCode,
Country,
LoremIpsum(usize),
ProductName,
ProductSku,
Version,
Hash,
UserAgent,
Email,
FirstName,
LastName,
FullName,
PhoneNumber,
Iso8601DurationString,
TimeZone,
DateWithinDays(i64),
AppointmentDateTime,
TailwindColorSet(Option<String>),
Custom(String),
Random,
AppointmentDurationNs,
}Variants§
Uuid
Generate a random UUID string
DateTime
Generate a random datetime string (ISO 8601 format)
Date
Generate a random date string (YYYY-MM-DD format)
Time
Generate a random time string (HH:MM:SS format)
HexString(usize)
Generate a random hex string of specified length
Base64String(usize)
Generate a random base64 string
JwtToken
Generate a random JSON Web Token (JWT) format string
CreditCardNumber
Generate a random credit card number (test format)
SocialSecurityNumber
Generate a random US Social Security Number (test format)
IpAddress
Generate a random IP address
MacAddress
Generate a random MAC address
ColorHex
Generate a random color hex code (e.g., #FF5733)
Oklch
Generate a random Oklch color (e.g., oklch(70% 0.3 60))
Filename(String)
Generate a random filename with extension
Url(String)
Generate a random URL with specified domain
CurrencyAmount
Generate a random currency amount (formatted as string)
Percentage
Generate a random percentage (0-100)
Latitude
Generate a random latitude coordinate
Longitude
Generate a random longitude coordinate
CompanyName
Generate a random company name
JobTitle
Generate a random job title
StreetAddress
Generate a random street address
City
Generate a random city name
State
Generate a random state/province name
PostalCode
Generate a random postal/zip code
Country
Generate a random country name
LoremIpsum(usize)
Generate a random lorem ipsum text of specified word count
ProductName
Generate a random product name
ProductSku
Generate a random SKU/product code
Version
Generate a random version string (e.g., “1.2.3”)
Hash
Generate a random hash string (SHA-256 format)
UserAgent
Generate a random user agent string
Generate a random email address
FirstName
Generate a random first name
LastName
Generate a random last name
FullName
Generate a random full name
PhoneNumber
Generate a random phone number
Iso8601DurationString
Generate a random ISO8601 duration string (e.g., “PT1H30M”)
TimeZone
Generate a random timezone identifier (e.g., “America/New_York”)
DateWithinDays(i64)
Generate a random date within the next N days, rounded to 15-minute intervals
AppointmentDateTime
Generate an appointment datetime within the next 10 days, 7am-8pm, 15-minute intervals
TailwindColorSet(Option<String>)
Generate a set of Tailwind-style colors (main, hover, active)
Custom(String)
Custom format with a user-provided pattern
Random
Generate a completely random string of 8-16 characters
AppointmentDurationNs
Generate appointment duration in nanoseconds (1-5 hours in 15-minute increments)
Implementations§
Source§impl Format
impl Format
pub fn unwrap_expr(expr: &Expr) -> &Expr
pub fn determine_enum_type(expr: &Expr) -> Result<String, Error>
pub fn parse_string_literal(expr: &Expr) -> Result<String, Error>
pub fn parse_bool_literal(expr: &Expr) -> Result<bool, Error>
pub fn parse_char_literal(expr: &Expr) -> Result<char, Error>
pub fn parse_i8_literal(expr: &Expr) -> Result<i8, Error>
pub fn parse_i16_literal(expr: &Expr) -> Result<i16, Error>
pub fn parse_i32_literal(expr: &Expr) -> Result<i32, Error>
pub fn parse_i64_literal(expr: &Expr) -> Result<i64, Error>
pub fn parse_isize_literal(expr: &Expr) -> Result<isize, Error>
pub fn parse_u8_literal(expr: &Expr) -> Result<u8, Error>
pub fn parse_u16_literal(expr: &Expr) -> Result<u16, Error>
pub fn parse_u32_literal(expr: &Expr) -> Result<u32, Error>
pub fn parse_u64_literal(expr: &Expr) -> Result<u64, Error>
pub fn parse_usize_literal(expr: &Expr) -> Result<usize, Error>
pub fn parse_f32_literal(expr: &Expr) -> Result<f32, Error>
pub fn parse_f64_literal(expr: &Expr) -> Result<f64, Error>
pub fn parse_from_expr(expr: &Expr) -> Result<Format, Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Format
impl<'de> Deserialize<'de> for Format
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Format, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Format, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Format
impl Serialize for Format
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl ToTokens for Format
impl ToTokens for Format
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
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 UnsafeUnpin 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<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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> ImplicitClone for Twhere
T: Clone,
impl<T> ImplicitClone for Twhere
T: Clone,
fn clone_quote_var(&self) -> Self
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.