-
Notifications
You must be signed in to change notification settings - Fork 46
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
Support Cow<'static, str>
for Readable
#25
Comments
Cow<'static, str>
Cow<'static, str>
for Readable
Yes, that could be special-cased inside of the derive macro. |
Wouldn't it be better to implement the trait manually in this case? It seems a very special case with possible different intents |
You'd have to implement the trait for the whole struct, which is not very ergonomic. An actually viable alternative would be to make a newtype (e.g. |
In the past I've done the new type strategy for um implemented traits on types. Mostly works and is flex according to the demanded solution |
I have a
struct
that contains aCow<'static, str>
member. This struct cannot implementReadable
at the moment, sinceReadable
is not able to create a borrow that is static. Would it be possible to makeReadable
create an owned clone of the string in this case?The text was updated successfully, but these errors were encountered: