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

Allow mime const initialization with attributes #52

Closed
yoshuawuyts opened this issue Jan 6, 2020 · 1 comment · Fixed by #105
Closed

Allow mime const initialization with attributes #52

yoshuawuyts opened this issue Jan 6, 2020 · 1 comment · Fixed by #105
Milestone

Comments

@yoshuawuyts
Copy link
Member

From talking with @dignifiedquire offline about #51, the biggest constraining feature we have currently is not being able to initialize mime types with attributes as constants. E.g.

const TEXT: Mime = "text/plain; encoding=utf-8"

We should figure out how to enable it, probably looking to hyperium/mime as inspiration as their impl does allow for this.

@yoshuawuyts yoshuawuyts changed the title Allow mime const ininitialization with attributes Allow mime const initialization with attributes Jan 6, 2020
@yoshuawuyts
Copy link
Member Author

Oh, so they don't allow this either. Instead internal fields are populated: https://docs.rs/mime/0.3.16/mime/constant.APPLICATION_JAVASCRIPT_UTF_8.html. We could probably do something similar I guess.

@yoshuawuyts yoshuawuyts added this to the breaking milestone Apr 21, 2020
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 a pull request may close this issue.

1 participant