API Reference

The full Rust API reference is auto-generated from source-code doc comments by rustdoc and published alongside this book. On the published documentation site, navigate directly to the links below.

Browse Online

Open the full API reference →

Key Entry Points

ModuleDescriptionLink
red_couchCrate root — module registration, TCP listener, connection handlingred_couch
red_couch::protocolBinary protocol types, opcode enum, request parser, response encoderprotocol
red_couch::asciiASCII text protocol parser and command dispatchascii
red_couch::metaMeta protocol parser, flag validation, command typesmeta

Commonly Referenced Items

Generating Locally

# Build and open in your browser
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --open

The generated docs cover all public types, functions, and modules in the red_couch crate. They are rebuilt from source on every change, so they always reflect the current code.

How It Works

The GitHub Actions Pages workflow builds both the mdBook site and the rustdoc output in a single job:

  1. mdbook build produces the narrative documentation in book/output/.
  2. cargo doc --no-deps produces the API reference in target/doc/.
  3. The workflow copies target/doc/ into book/output/api/, so the final Pages artifact has the structure:
    book/output/
    ├── index.html          ← mdBook site root
    ├── api/
    │   └── red_couch/      ← rustdoc API reference
    │       ├── index.html
    │       ├── protocol/
    │       ├── ascii/
    │       └── meta/
    └── ...                 ← other book chapters
    

The links on this page point into the api/ subtree, so they work on the published site.

CI Validation

The CI pipeline validates that both the API documentation and the book build cleanly on every push to main and on pull requests:

RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
mdbook build

This ensures documentation stays in sync with the code and catches broken links or build errors before merging.