pub trait Kind {
// Required method
fn kind(&mut self, kind: Kind) -> Option<()>;
}
Expand description
Combine one or more specs into a range of multiple.
Required Methods§
Sourcefn kind(&mut self, kind: Kind) -> Option<()>
fn kind(&mut self, kind: Kind) -> Option<()>
Set the kind of the spec, which happens only once if it happens at all.
In case this method isn’t called, assume Single
.
Reject a kind by returning None
to stop the parsing.
Note that ranges don’t necessarily assure that a second specification will be parsed.
If ^rev
is given, this method is called with spec::Kind::RangeBetween
and no second specification is provided.
Note that the method can be called even if other invariants are not fulfilled, treat these as errors.