# API reference
The full Rust API reference is generated by rustdoc and published on docs.rs. This site covers
installation, the tutorial, the brokers and the broker-author contract; each feature module
documents itself on docs.rs.
- **[ruststream on docs.rs](https://docs.rs/ruststream)** - the crate. The AsyncAPI, metrics and
conformance modules appear only in a build with their features on:
[docs.rs/ruststream (all features)](https://docs.rs/crate/ruststream/latest/features).
The `ruststream` command-line tool ships in the same crate, behind the `cli` feature. See
[`runtime::cli`](https://docs.rs/ruststream/latest/ruststream/runtime/cli/index.html).
## Building the reference locally
```bash
cargo doc --all-features --open
```
## Key entry points
| `RustStream` | `ruststream::runtime` | the application object |
| `RunningApp` | `ruststream::runtime` | the handle to a started service: readiness, the fail-fast signal, graceful shutdown |
| `Router` | `ruststream::runtime` | a group of handlers that gets its broker at the mount site |
| `Handle`, `subscriber` | `ruststream::runtime` | manual registration: the handler-body trait and its binding to a subscription source |
| `FromContext`, `State`, `FromRef` | `ruststream::runtime` / `ruststream` | the handler's extractor parameters and the derive that injects state |
| `Broker`, `Subscribe`, `Subscriber`, `Publisher`, `IncomingMessage` | `ruststream` | the broker contract |
| `SubscriptionSource`, `Name` | `ruststream` | subscription descriptors |
| `JsonCodec`, `MsgpackCodec`, `CborCodec` | `ruststream::codec` | codecs for the wire format |
| `build_spec` | `ruststream::asyncapi` | AsyncAPI document generation |
| `Metrics` | `ruststream::metrics` | Prometheus metrics |
| `TestApp` | `ruststream::testing` | the in-process harness for unit-testing a service |
| `TestableBroker` | `ruststream::testing` | the contract a broker's in-process transport implements |
| `harness::run_suite` | `ruststream::conformance` | the check suite for broker authors |