-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Change return type of Field::content_type
#637
Comments
Why do you prefer a string over It looks like |
It says in the issue description - avoiding the public dependency on |
Yep exactly what @SabrinaJewson said. |
Makes sense.
Perhaps users could be encouraged to parse the strings into enums with other libraries if they so choose? I think that fits into (what I perceive to be) the goal and spirit of axum. |
Yes. We should continue to use mime internally, but expose a string that users can parse into whatever representation is appropriate. |
Replaces `Field::content_type`'s return type with `&str` Closes tokio-rs#637
Replaces `Field::content_type`'s return type with `&str`. This is a breaking change. Closes tokio-rs#637
Replaces `Field::content_type`'s return type with `&str`. This is a breaking change. Closes #637
Fixed in #642 |
Replaces `Field::content_type`'s return type with `&str`. This is a breaking change. Closes #637
Replaces `Field::content_type`'s return type with `&str`. This is a breaking change. Closes #637
Replaces `Field::content_type`'s return type with `&str`. This is a breaking change. Closes #637
Replaces `Field::content_type`'s return type with `&str`. This is a breaking change. Closes #637
Replaces `Field::content_type`'s return type with `&str`. This is a breaking change. Closes #637
It should return some kind of string, or a type axum owns, to avoid the public dependency on mime.
Mime
implementsAsRef<str>
meaning we can probably return&str
but should verify that it returns the whole mime type and not just a part.The text was updated successfully, but these errors were encountered: