rocketmq-rust icon indicating copy to clipboard operation
rocketmq-rust copied to clipboard

[Doc📝] Rename outcome to request_result in the TransportClient::invoke_request Rustdoc example

Open mxsm opened this issue 5 days ago • 1 comments

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( to let request_result = client.invoke_request(. Line 470.
  • Change match outcome { to match 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

mxsm avatar Nov 28 '26 16:11 mxsm

Hi @mxsm, I'd like to work on this issue. Could you please assign it to me?

Harsh28-raj avatar Nov 28 '26 16:11 Harsh28-raj