nats.rs
nats.rs copied to clipboard
Keep `context` and `client` fields for `Publish` and `Request` by reference
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
Just broke https://github.com/nats-io/nats.rs/pull/866 into atomic commits for rebase and merge.