Enum feattle_core::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
sourceimpl Clone for StringFormatKind
impl Clone for StringFormatKind
sourcefn clone(&self) -> StringFormatKind
fn clone(&self) -> StringFormatKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StringFormatKind
impl Debug for StringFormatKind
sourceimpl PartialEq<StringFormatKind> for StringFormatKind
impl PartialEq<StringFormatKind> for StringFormatKind
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &StringFormatKind) -> bool
fn ne(&self, other: &StringFormatKind) -> bool
This method tests for !=.
sourceimpl Serialize for StringFormatKind
impl Serialize for StringFormatKind
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more