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

Custom transports don't have access to serialize #78

Open
isaac-mcfadyen opened this issue Feb 11, 2023 · 1 comment
Open

Custom transports don't have access to serialize #78

isaac-mcfadyen opened this issue Feb 11, 2023 · 1 comment

Comments

@isaac-mcfadyen
Copy link

Hey! 👋

Awesome library, thanks for all of the work on it.

Small issue I'm running into when trying to make a custom transport.

  • The chitchat::serialize module is marked as pub(crate), which means you can't serialize a ChitchatMessage outside of the crate.
  • Additionally, since ChitchatMessage isn't marked as Serde's Serialize/Deserialize, there's actually no way to serialize messages for a custom transport.

This seems like an easy fix unless there's a specific reason not to: just remove the pub(crate) and leave pub on chitchat::serialize.

@melbourne2991
Copy link

Additionally, the transport & socket traits are public but to implement them you would need to re-implement serialization.

I'll create a PR for this 🤞

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

No branches or pull requests

2 participants