chrono
chrono copied to clipboard
ParseError docs should show variants and documentation for them
Currently, the ParseError docs don't even mention it's an enum, let alone what the variants are and what they mean. There's a lot of good documentation in the source code -- that should be exposed, so when you get an error like NotEnough it's clear what it means (i.e. not enough information for a unique time, rather than not enough components to fill out the format or similar)
It seems that ParseError's internal field of type ParseErrorKind, probably intentionally:
https://github.com/chronotope/chrono/blob/614ec8766947620481e2f986ca86ed9de1824c3b/src/naive/date.rs#L2144)
Which means it doesn't show up in the documentation. Shouldn't this be public to allow better handling of errors?