Enum regex_automata::util::captures::GroupInfoErrorKind
source · enum GroupInfoErrorKind {
TooManyPatterns {
err: PatternIDError,
},
TooManyGroups {
pattern: PatternID,
minimum: usize,
},
MissingGroups {
pattern: PatternID,
},
FirstMustBeUnnamed {
pattern: PatternID,
},
Duplicate {
pattern: PatternID,
name: String,
},
}
Expand description
The kind of error that occurs when building a GroupInfo
fails.
We keep this un-exported because it’s not clear how useful it is to export it.
Variants§
TooManyPatterns
This occurs when too many patterns have been added. i.e., It would
otherwise overflow a PatternID
.
Fields
err: PatternIDError
TooManyGroups
This occurs when too many capturing groups have been added for a particular pattern.
Fields
MissingGroups
An error that occurs when a pattern has no capture groups. Either the group info must be empty, or all patterns must have at least one group (corresponding to the unnamed group for the entire pattern).
FirstMustBeUnnamed
An error that occurs when one tries to provide a name for the capture group at index 0. This capturing group must currently always be unnamed.
Fields
Duplicate
An error that occurs when duplicate capture group names for the same pattern are added.
NOTE: At time of writing, this error can never occur if you’re using regex-syntax, since the parser itself will reject patterns with duplicate capture group names. This error can only occur when the builder is used to hand construct NFAs.
Trait Implementations§
source§impl Clone for GroupInfoErrorKind
impl Clone for GroupInfoErrorKind
source§fn clone(&self) -> GroupInfoErrorKind
fn clone(&self) -> GroupInfoErrorKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more