nats.rs icon indicating copy to clipboard operation
nats.rs copied to clipboard

Keep `context` and `client` fields for `Publish` and `Request` by reference

Open caspervonb opened this issue 1 year ago • 1 comments

Avoids clones to Client and Context when publishing messages and sending requests, instead binding them to a lifetime and holding onto the required state by reference.

Supersedes https://github.com/nats-io/nats.rs/pull/866

caspervonb avatar Mar 06 '23 18:03 caspervonb

Just broke https://github.com/nats-io/nats.rs/pull/866 into atomic commits for rebase and merge.

caspervonb avatar Mar 06 '23 18:03 caspervonb