Skip to content

Conversation

@nekevss
Copy link
Member

@nekevss nekevss commented Dec 13, 2025

This PR creates a proper encoding module in ixdtf and exposes the EncodingType trait to allow wrapping parsers to be generic on EncodingType.

@nekevss nekevss requested a review from a team as a code owner December 13, 2025 18:55
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

This is a util that is easy to make breaking changes to, so I am comfortable stabilizing such an API for now. It's not necessarily the best API for this, but it's ... okay.

@sffc , thoughts?

@Manishearth
Copy link
Member

I guess because it's sealed we should doc(hidden) the methods?

@nekevss
Copy link
Member Author

nekevss commented Dec 15, 2025

I can doc(hidden) the methods. I don't see a reason for someone to be implementing the trait (hence why it's sealed).

Is there a general preference towards what the API should be for this? The main goal here is to expose the trait so that a parser that wraps the IxdtfParser can take advantage of the trait rather than needing an enum for Utf16 and Utf8.

@Manishearth
Copy link
Member

Is there a general preference towards what the API should be for this?

No, just that I'm noting that we haven't thought too deeply about this. doc(hidden) lets us not have to worry about 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

Successfully merging this pull request may close these issues.

2 participants