chrono icon indicating copy to clipboard operation
chrono copied to clipboard

ParseError docs should show variants and documentation for them

Open nic-hartley opened this issue 6 years ago • 1 comments

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)

nic-hartley avatar Oct 17 '19 19:10 nic-hartley

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?

Raz-Hemo avatar Jun 12 '20 17:06 Raz-Hemo