Skip to content

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.

The ruststream command-line tool ships in the same crate, behind the cli feature. See runtime::cli.

Building the reference locally

cargo doc --all-features --open

Key entry points

Item Module Purpose
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