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

Re-export udp::{RecvMeta, UdpState} for AsyncUdpSocket #1476

Merged
merged 2 commits into from
Jan 7, 2023

Conversation

XOR-op
Copy link
Contributor

@XOR-op XOR-op commented Jan 6, 2023

To implement AsyncUdpSocket Trait from quinn crate, we must use the types RecvMeta and UdpState. However, current version of quinn does not re-export them, so anyone who wants to implement the trait needs importing another quinn-udp crate. This PR fixes this problem by re-export them in quinn crate.

@djc
Copy link
Member

djc commented Jan 6, 2023

Seems okay. Maybe we should expose these as part of a public udp module?

@XOR-op
Copy link
Contributor Author

XOR-op commented Jan 6, 2023

Do you mean we should export the whole udp module? That is a good idea since they are all helpful when implementing a custom AsyncUdpSocket, and in fact, there are only 4 structs + 1 constant.

@djc
Copy link
Member

djc commented Jan 6, 2023

I'd prefer not to use a * import, but feel free to export all the items that are useful to you.

@XOR-op
Copy link
Contributor Author

XOR-op commented Jan 6, 2023

I finally re-export quinn-udp as a submodule of quinn, which does not mess up the root namespace.

@djc djc merged commit c88a6ec into quinn-rs:main Jan 7, 2023
@djc djc mentioned this pull request May 8, 2023
3 tasks
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.

3 participants