[Doc📝] Rename outcome to request_result in the TransportClient::invoke_request Rustdoc example
Issue Type
Improvement suggestion
Location
The Examples section of TransportClient::invoke_request in rocketmq-transport/src/clients/rocketmq_tokio_client/api.rs. Rustdoc example.
Description
invoke_request returns Result<OutboundRequestResult, TransportError>. The ? in .await? propagates a transport error, so the example matches on an OutboundRequestResult. The name request_result tells readers what that match examines. It can be Response, Rejected, or Contract. Inside Response(response), response is the RemotingCommand whose code the example reads. Method signature and enum variants.
Suggested Fix
Update the binding and its use in the same example.
- Change
let outcome = client.invoke_request(tolet request_result = client.invoke_request(. Line 470. - Change
match outcome {tomatch request_result {. Line 475.
The snippet is marked rust,ignore. From the repository root, build the docs with cargo doc -p rocketmq-transport --lib --no-deps and check that the rendered example both binds and matches on request_result.
Willing to contribute?
- [ ] I can submit a PR for this
Hi @mxsm, I'd like to work on this issue. Could you please assign it to me?