Struct cosmic_space::selector::KindSelectorDef
source · pub struct KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector> {
pub base: GenericKindSelector,
pub sub: GenericSubKindSelector,
pub specific: ValuePattern<SpecificSelector>,
}
Fields
base: GenericKindSelector
sub: GenericSubKindSelector
specific: ValuePattern<SpecificSelector>
Implementations
sourceimpl KindSelectorDef<Pattern<BaseKind>, Pattern<Option<CamelCase>>, SpecificSelectorDef<Pattern<Domain>, Pattern<Domain>, Pattern<SkewerCase>, Pattern<SkewerCase>, VersionReq>>
impl KindSelectorDef<Pattern<BaseKind>, Pattern<Option<CamelCase>>, SpecificSelectorDef<Pattern<Domain>, Pattern<Domain>, Pattern<SkewerCase>, Pattern<SkewerCase>, VersionReq>>
pub fn new(
kind: KindBaseSelector,
sub_kind: SubKindSelector,
specific: ValuePattern<SpecificSelector>
) -> Self
pub fn from_base(base: BaseKind) -> Self
pub fn matches(&self, kind: &Kind) -> boolwhere
KindParts: Eq + PartialEq,
pub fn as_point_segments(&self) -> Result<String, SpaceErr>
Trait Implementations
sourceimpl<GenericKindSelector: Clone, GenericSubKindSelector: Clone, SpecificSelector: Clone> Clone for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
impl<GenericKindSelector: Clone, GenericSubKindSelector: Clone, SpecificSelector: Clone> Clone for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
sourcefn clone(
&self
) -> KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
fn clone(
&self
) -> KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
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 moresourceimpl<GenericKindSelector: Debug, GenericSubKindSelector: Debug, SpecificSelector: Debug> Debug for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
impl<GenericKindSelector: Debug, GenericSubKindSelector: Debug, SpecificSelector: Debug> Debug for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
sourceimpl<'de, GenericKindSelector, GenericSubKindSelector, SpecificSelector> Deserialize<'de> for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: Deserialize<'de>,
GenericSubKindSelector: Deserialize<'de>,
SpecificSelector: Deserialize<'de>,
impl<'de, GenericKindSelector, GenericSubKindSelector, SpecificSelector> Deserialize<'de> for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: Deserialize<'de>,
GenericSubKindSelector: Deserialize<'de>,
SpecificSelector: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<GenericKindSelector: Hash, GenericSubKindSelector: Hash, SpecificSelector: Hash> Hash for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
impl<GenericKindSelector: Hash, GenericSubKindSelector: Hash, SpecificSelector: Hash> Hash for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
sourceimpl<GenericKindSelector: PartialEq, GenericSubKindSelector: PartialEq, SpecificSelector: PartialEq> PartialEq<KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>> for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
impl<GenericKindSelector: PartialEq, GenericSubKindSelector: PartialEq, SpecificSelector: PartialEq> PartialEq<KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>> for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
sourcefn eq(
&self,
other: &KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
) -> bool
fn eq(
&self,
other: &KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
) -> bool
sourceimpl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> Serialize for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: Serialize,
GenericSubKindSelector: Serialize,
SpecificSelector: Serialize,
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> Serialize for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: Serialize,
GenericSubKindSelector: Serialize,
SpecificSelector: Serialize,
impl<GenericKindSelector: Eq, GenericSubKindSelector: Eq, SpecificSelector: Eq> Eq for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> StructuralEq for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> StructuralPartialEq for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>
Auto Trait Implementations
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> RefUnwindSafe for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: RefUnwindSafe,
GenericSubKindSelector: RefUnwindSafe,
SpecificSelector: RefUnwindSafe,
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> Send for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: Send,
GenericSubKindSelector: Send,
SpecificSelector: Send,
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> Sync for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: Sync,
GenericSubKindSelector: Sync,
SpecificSelector: Sync,
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> Unpin for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: Unpin,
GenericSubKindSelector: Unpin,
SpecificSelector: Unpin,
impl<GenericKindSelector, GenericSubKindSelector, SpecificSelector> UnwindSafe for KindSelectorDef<GenericKindSelector, GenericSubKindSelector, SpecificSelector>where
GenericKindSelector: UnwindSafe,
GenericSubKindSelector: UnwindSafe,
SpecificSelector: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
sourcefn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
sourceimpl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
sourcefn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more