Type Alias KindSelector

Source
pub type KindSelector = KindSelectorDef<KindBaseSelector, SubKindSelector, SpecificSelector>;

Aliased Type§

pub struct KindSelector {
    pub base: Pattern<BaseKind>,
    pub sub: Pattern<Option<CamelCase>>,
    pub specific: ValuePattern<SpecificSelectorDef<Pattern<Domain>, Pattern<Domain>, Pattern<SkewerCase>, Pattern<SkewerCase>, VersionReq>>,
}

Fields§

§base: Pattern<BaseKind>§sub: Pattern<Option<CamelCase>>§specific: ValuePattern<SpecificSelectorDef<Pattern<Domain>, Pattern<Domain>, Pattern<SkewerCase>, Pattern<SkewerCase>, VersionReq>>

Implementations§

Source§

impl KindSelector

Source

pub fn new( kind: KindBaseSelector, sub_kind: SubKindSelector, specific: ValuePattern<SpecificSelector>, ) -> Self

Source

pub fn from_base(base: BaseKind) -> Self

Source

pub fn matches(&self, kind: &Kind) -> bool

Source

pub fn as_point_segments(&self) -> Result<String, SpaceErr>

Source§

impl KindSelector

Source

pub fn any() -> Self

Trait Implementations§

Source§

impl FromStr for KindSelector

Source§

type Err = SpaceErr

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl ToString for KindSelector

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more