docs: add testing, asyncapi, and DI example blocks to the README#131
Merged
Conversation
Expand the README with three example blocks so a reader sees the common flows without leaving the page: unit-testing a service with the `TestApp` harness against the in-memory broker, building the AsyncAPI spec and viewer HTML programmatically, and injecting state-backed dependencies into a handler via `#[derive(FromRef)]` and `State<T>`. Each block links to its compiling `examples/*.rs` source of truth so the snippets cannot silently drift. Drop the stale `ruststream-py` Ecosystem line: Python bindings were removed, the reference no longer points at a maintained crate. Docs-only; no code or API change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Expand the README with three example blocks so a reader sees the common flows without leaving the page:
Test it) - drive a built app with theTestAppharness against the in-memory broker, inject input, and assert handler settlement plus a downstream publish.Documentation) - build the AsyncAPI spec and the interactive viewer HTML programmatically withbuild_spec/render_viewer_html. The CLIruststream asyncapi genalready appears underRun it, so this covers the in-process path.FromRef, and take a dependency as aState<T>handler argument instead of reaching throughctx.state().Each block links to its compiling
examples/*.rssource of truth (examples/testing.rs,examples/asyncapi_http.rs,examples/from_context.rs) so the snippets cannot silently drift; GitHub-rendered README does not support file includes, so the snippets are inline fences trimmed from those examples.Also drop the stale
ruststream-pyEcosystem line: Python bindings were removed, the reference no longer points at a maintained crate.Fixes #130
Type of change
raising the MSRV - a minor version bump pre-1.0)
Checklist
just checkpasses: rustfmt, clippy, andcargo checkwith all features and with--no-default-features)-D warnings)just test)# Examplesdoctest, and user-facing changes are reflected inexamples/where applicable