imap-codec icon indicating copy to clipboard operation
imap-codec copied to clipboard

docs: improve imap-types documentation (mentioning `Try{,From}`, valid inputs, etc.

Open jakoschiko opened this issue 2 years ago • 2 comments

E.g. Quoted has documentation that explains its meaning and how it is represented on the wire. But IMO the following information is important but missing:

  • That TryFrom and From are the main constructors
  • What inputs are invalid regarding the Rust API (e.g. the wire format of Quoted forbids unquoted ", but not the Rust API)

jakoschiko avatar Sep 25 '23 20:09 jakoschiko

About to tackle this: Do you have an idea what would be the best place to put the documentation in? There is a "primer" at the top-level explaining a bit. Maybe we should put this into the core module, too?

duesee avatar Jun 29 '24 13:06 duesee

Personally if I want to create an instance of type Foo I look at the documentation of Foo. Ideally there is an example that I can copy+paste. But a small mention of Try{,From} would be sufficient. If I want a more general understanding of the library/module, then I look at the library/module-level documentation (and I prefer not to because I'm lazy).

jakoschiko avatar Jun 29 '24 20:06 jakoschiko