pub enum PatternProblem {
NoAnchor,
AdjacentCaptures {
first: String,
second: String,
},
UnsupportedBraces {
near: String,
},
EmptyCapture,
UnknownCapture {
name: String,
suggestion: Option<String>,
},
DuplicateCapture {
name: String,
},
}Expand description
One problem found in a match: pattern (validation pass 1), typed so each
maps to a stable diagnostic code.
Variants§
NoAnchor
No literal text to anchor on — a bare capture matches every step.
AdjacentCaptures
Two captures with nothing between them — the matcher cannot split them.
UnsupportedBraces
A stray {/} inside literal text (unclosed or unescaped).
EmptyCapture
An empty {} capture.
UnknownCapture
A capture that names no declared param.
Fields
DuplicateCapture
The same capture written twice — a later match would silently overwrite the earlier binding.
Implementations§
Trait Implementations§
Source§impl Clone for PatternProblem
impl Clone for PatternProblem
Source§fn clone(&self) -> PatternProblem
fn clone(&self) -> PatternProblem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PatternProblem
impl Debug for PatternProblem
Source§impl Display for PatternProblem
impl Display for PatternProblem
impl Eq for PatternProblem
Source§impl PartialEq for PatternProblem
impl PartialEq for PatternProblem
impl StructuralPartialEq for PatternProblem
Auto Trait Implementations§
impl Freeze for PatternProblem
impl RefUnwindSafe for PatternProblem
impl Send for PatternProblem
impl Sync for PatternProblem
impl Unpin for PatternProblem
impl UnsafeUnpin for PatternProblem
impl UnwindSafe for PatternProblem
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.