pub enum ValuePattern<T> {
Any,
None,
Pattern(T),
}
Variants§
Implementations§
Source§impl<T> ValuePattern<T>where
T: ToString,
impl<T> ValuePattern<T>where
T: ToString,
pub fn stringify(self) -> ValuePattern<String>
Source§impl<T> ValuePattern<T>
impl<T> ValuePattern<T>
pub fn modify<X, F>(self, f: F) -> Result<ValuePattern<X>, SpaceErr>
pub fn wrap<X>(self, x: X) -> ValuePattern<X>
pub fn is_match<X>(&self, x: &X) -> Result<(), ()>where
T: ValueMatcher<X>,
pub fn is_match_opt<X>(&self, x: Option<&X>) -> Result<(), ()>where
T: ValueMatcher<X>,
Trait Implementations§
Source§impl<T: Clone> Clone for ValuePattern<T>
impl<T: Clone> Clone for ValuePattern<T>
Source§fn clone(&self) -> ValuePattern<T>
fn clone(&self) -> ValuePattern<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for ValuePattern<T>
impl<T: Debug> Debug for ValuePattern<T>
Source§impl<'de, T> Deserialize<'de> for ValuePattern<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ValuePattern<T>where
T: Deserialize<'de>,
Source§fn 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
Source§impl<T: Hash> Hash for ValuePattern<T>
impl<T: Hash> Hash for ValuePattern<T>
Source§impl<T: PartialEq> PartialEq for ValuePattern<T>
impl<T: PartialEq> PartialEq for ValuePattern<T>
Source§impl<T> Serialize for ValuePattern<T>where
T: Serialize,
impl<T> Serialize for ValuePattern<T>where
T: Serialize,
Source§impl ToResolved<ValuePattern<SubstancePatternDef<PointDef<RouteSeg, PointSeg>>>> for PatternBlockCtx
impl ToResolved<ValuePattern<SubstancePatternDef<PointDef<RouteSeg, PointSeg>>>> for PatternBlockCtx
Source§impl ToResolved<ValuePattern<SubstancePatternDef<PointDef<RouteSeg, PointSegCtx>>>> for PatternBlockVar
impl ToResolved<ValuePattern<SubstancePatternDef<PointDef<RouteSeg, PointSegCtx>>>> for PatternBlockVar
Source§impl<T> ToString for ValuePattern<T>where
T: ToString,
impl<T> ToString for ValuePattern<T>where
T: ToString,
impl<T: Eq> Eq for ValuePattern<T>
impl<T> StructuralPartialEq for ValuePattern<T>
Auto Trait Implementations§
impl<T> Freeze for ValuePattern<T>where
T: Freeze,
impl<T> RefUnwindSafe for ValuePattern<T>where
T: RefUnwindSafe,
impl<T> Send for ValuePattern<T>where
T: Send,
impl<T> Sync for ValuePattern<T>where
T: Sync,
impl<T> Unpin for ValuePattern<T>where
T: Unpin,
impl<T> UnwindSafe for ValuePattern<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn 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
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn 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