Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rumqttc::client::Iter public #402

Merged
merged 1 commit into from Jun 16, 2022

Conversation

kelnos
Copy link
Contributor

@kelnos kelnos commented May 31, 2022

So this is perhaps a little esoteric, but in order to implement some foreign traits (https://docs.rs/embedded-svc/0.21.2/embedded_svc/mqtt/client/trait.Connection.html), I need to be able to wrap the Iter returned by rumqttc::Connection.iter(). Maybe there are some arcane tricks to do this using a trait object over Iterator, but if there are, I haven't been able to get it to work right, and, regardless, it's incredibly awkward. Much more straightforward would be to be able to just embed the actual type of Iter into my struct, but I can't because it's declared only in a private module.

@kelnos
Copy link
Contributor Author

kelnos commented Jun 6, 2022

Hm, failure seems like a flaky test?

@de-sh
Copy link
Member

de-sh commented Jun 9, 2022

Hey @kelnos, it seems that calling it Iter is the standard(refer: https://docs.rs/crossbeam-channel/latest/crossbeam_channel/struct.Iter.html). We'll prefer if we don't alias it.

rumqttc/src/lib.rs Outdated Show resolved Hide resolved
@kelnos
Copy link
Contributor Author

kelnos commented Jun 9, 2022

Oh hm, looks like lib.rs has changed drastically in the past week. Will take a look again when I have a little more time.

@kelnos
Copy link
Contributor Author

kelnos commented Jun 10, 2022

Ok, updated for current master. Did the same for the v5 client.

@de-sh de-sh merged commit ce1d42c into bytebeamio:master Jun 16, 2022
@de-sh
Copy link
Member

de-sh commented Jun 16, 2022

Wohoo @kelnos, congrats on the merge! 🥳

@de-sh de-sh mentioned this pull request Jun 16, 2022
Closed
@kelnos kelnos deleted the public-connection-iter branch June 18, 2022 07:08
carlocorradini pushed a commit to carlocorradini/rumqtt that referenced this pull request Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants