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

Expose Serializer and Deserializer directly #8

Closed
wants to merge 1 commit into from

Conversation

Twey
Copy link

@Twey Twey commented Nov 14, 2023

Allows external projects to plug BCS into libraries that expect a serde Serializer or Deserializer implementation.

@Twey Twey marked this pull request as draft November 14, 2023 18:29
@Twey Twey marked this pull request as ready for review November 14, 2023 18:48
@Twey Twey mentioned this pull request Nov 14, 2023
Allows external projects to plug BCS into libraries that expect a
`serde` `Serializer` or `Deserializer` implementation.
Copy link
Contributor

@ma2bd ma2bd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bmwill ?

@@ -479,8 +479,7 @@ where
}
}

#[doc(hidden)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the #[doc(hidden)] ?

Copy link
Author

@Twey Twey Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was previously redundant, but you're right, it's now relevant. I was fooled by this regression in rustc — but I see that as the older rustc in CI finds, this is indeed incorrect since we're accidentally exposing the internal BcsDeserializer trait.

I'm a bit loath to expose BcsDeserializer, though, which looks to be quite internal, so I'll look at refactoring it when I get a moment. I have a suspicion it can be broken down into Read/BufRead + serde::Deserializer — or even if it can't completely we can expose those more standard bounds instead of the internal BcsDeserializer.

@ma2bd
Copy link
Contributor

ma2bd commented Feb 18, 2024

I'm going to close this because the change didn't get support from everyone.

@ma2bd ma2bd closed this Feb 18, 2024
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