Enum feattle::StringFormatKind
source · 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§
Any
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.
Choices(&'static [&'static str])
Only one of the listed values is accepted.
Trait Implementations§
source§impl Clone for StringFormatKind
impl Clone for StringFormatKind
source§fn clone(&self) -> StringFormatKind
fn clone(&self) -> StringFormatKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StringFormatKind
impl Debug for StringFormatKind
source§impl PartialEq<StringFormatKind> for StringFormatKind
impl PartialEq<StringFormatKind> for StringFormatKind
source§fn eq(&self, other: &StringFormatKind) -> bool
fn eq(&self, other: &StringFormatKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for StringFormatKind
impl Serialize for StringFormatKind
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,
Serialize this value into the given Serde serializer. Read more
impl Eq for StringFormatKind
impl StructuralEq for StringFormatKind
impl StructuralPartialEq for StringFormatKind
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§
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