pub trait SpecExt: Default + Clone + Display + Sized {
type Data: Display;
const DATA_DESC: &'static str;
fn from_string(s: impl Into<String>) -> Res<Self>;
fn is_empty(&self) -> bool;
fn data_of_alloc(alloc: &Alloc) -> Arc<Vec<Self::Data>>;
fn matches(&self, data: &Self::Data) -> bool;
fn matches_anything(&self) -> bool;
}
Expand description
Trait that string-like specifications must implement.
Required Associated Types
Required Associated Constants
Required Methods
fn from_string(s: impl Into<String>) -> Res<Self>
fn from_string(s: impl Into<String>) -> Res<Self>
Constructor from strings.
True if the input data is a match for this specification.
fn matches_anything(&self) -> bool
fn matches_anything(&self) -> bool
True if the specification matches a repetition of anything.