Enum feattle::StringFormatKind [−][src]
pub enum StringFormatKind {
Any,
Pattern(&'static str),
Choices(&'static [&'static str]),
}
Expand description
An exact and machine-readable description of a feattle string-type
Variants
Accepts any possible string.
Pattern(&'static str)
The string must conform to the pattern, described using
JavaScript’s RegExp syntax
in 'u'
(Unicode) mode.
The matching is done against the entire value, not just any subset, as if a ^(?:
was
implied at the start of the pattern and a )$
at the end.
Tuple Fields of Pattern
0: &'static str
Choices(&'static [&'static str])
Only one of the listed values is accepted.
Tuple Fields of Choices
0: &'static [&'static str]
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for StringFormatKind
impl Send for StringFormatKind
impl Sync for StringFormatKind
impl Unpin for StringFormatKind
impl UnwindSafe for StringFormatKind
Blanket Implementations
Mutably borrows from an owned value. Read more