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

Type of data the specification is able to check for matches.

Required Associated Constants

Description of the kind of data this specification works on.

Required Methods

Constructor from strings.

True if the specification is empty, meaning it is ignored.

Extracts data from an allocation.

True if the input data is a match for this specification.

True if the specification matches a repetition of anything.

Implementors