This patch adds a new --viewer command line option that lets the user
select a viewer that displays the documentation. It also adds a default
viewer implementation that uses html2text to generate plain text from
the HTML documentation.
html2text requires the ptr_cast feature and we use the Option::as_deref
method in the viewer implementation, so we have to update the minimum
supported Rust version to 1.40.
This patch adds typical Rust documentation locations to the sources:
- /usr/share/doc/rust{,-doc}/html for the standard library documentation
- ./target/doc for the documentation generated for the current crate
It also adds the --no-default-sources option that disables this
behavior.
This patch adds the parser module that uses kuchiki and html5ever to
parse the HTML documentation.
As kuchiki requires std::mem::MaybeUninit, we have to bump the minimum
supported Rust version to 1.36.
This patch adds the doc and source module with the basic data structures
for the documentation items:
- A Source loads the documentation items from e. g. the file system.
- The documentation items (modules, traits, etc.) are grouped by crates.
It also adds a simple Source implementation, DirSource, that reads the
data from a local directory.