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

re-export Qos type (from mqtt3)

Open tshepang opened this issue 7 years ago • 1 comments

One use I saw is PubOpt::new, whose first arg is Qos. At the moment, I have to add mqtt3 do Cargo.toml, which I would rather avoid (since it's an implicit dependency).

tshepang avatar Apr 26 '17 18:04 tshepang

Alternatively, maybe remove the new call since it does not seem to add anything? One can just do something like:

let opts = PubOpt::at_least_once() | PubOpt::retain();
// in place of
let opts = PubOpt::new(mqtt3::QoS::AtLeastOnce, true);

The former is more explicit, while the latter has some magical second argument.

tshepang avatar Apr 26 '17 19:04 tshepang