-
Notifications
You must be signed in to change notification settings - Fork 532
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 for String<Bytes> or similar #392
Comments
Thinking about it more, that ❓ If I tried writing the support for prost-build, would there be interest in accepting it (after figuring out proper naming, what to do with generics in the Vec -> SmallVec case, etc), or would that be considered out of scope for the crate? |
Yes I'd like to support this, in fact a recent refactor in danburkert@79f0dfd was laying the groundwork. I don't think the set of types you will be able to substitue will be able to be 'open', because |
secret from #369 |
About being open… I was wondering if there would be a trait these things need to satisfy (it probably isn't Right now I'm looking for a good (Yes, if the |
If anyone is interested in longer and more verbose description of what I have in mind: https://vorner.github.io/2021/01/31/saving-some-allocations.html If you'd be interested in doing it with the traits as I mentioned above, I get my hands dirty and see if I can come up with a reasonable PR for that. |
I want this feature too. @vorner are you still working on it? |
I randomly noticed there's a |
Not actively. I have that bytes-utils crate around, and I'm intent on keeping it alive, but otherwise don't have any actual plans or any work in progress around it. Besides, I currently don't have the need for that feature any more (but I still think it would be a neat thing). |
OK, will try look into making it myself. |
Is anyone currently working on this? I have some use case for the generic version for supporting Depending on how much work it is I might(1) be able to contribute it. (1): I will most likely know weather or not I could contribute, and how much time I could spend on it later this week. |
No one is currently working on this at the moment. |
thanks 👍
…------- Original Message -------
On Monday, May 23rd, 2022 at 8:50 PM, Lucio Franco ***@***.***> wrote:
No one is currently working on this at the moment.
—
Reply to this email directly, [view it on GitHub](#392 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AB2HJENUTP6KJGONTHW2YPDVLPHQZANCNFSM4TWN3IWQ).
You are receiving this because you commented.Message ID: ***@***.***>
|
@rustonaut I did spend some time on it but it's more complex than I expected, so couldn't finish it. |
Hello
Thanks for #31, I can't wait for a release 😇.
Anyway, it would be nice if strings could get similar support for referencing the Bytes buffer too.
I don't have a preferred/thought through solution, only some ideas how that could work:
Bytes
into something derefing to&str
(there were some mentioned in optimize for protos containing large blobs #31, I don't know how well maintained they are), maybe make the dependency optional. Then the same option would changeString -> String<Bytes>
as the one that currently changesVec<u8> -> Bytes
.field_type_replace("String", "Whatever", &["paths"])
. That type would have to supportMessage
already in some way, but that would be up to the user. That could probably be used to replace „nested“ fields encoded as bytes by the actual thing inside.But anything that works would be nice :-).
Thank you
The text was updated successfully, but these errors were encountered: