Dan Burkert
Dan Burkert
I do like this idea, though. It definitely has some merit. My experience has been that working with enums through the typesafe getter/setter is 'good enough', but they have a...
Can anyone share some application code that this alternate representation cleans up? I'd love to be convinced since this seems to come up over and over, but I'm still not...
Yes, they are still present in `prost` 0.7. `prost` enums have never provided a `From` impl, I think you may be looking for the `from_i32` method. Or you can use...
Yeah these methods are generated via derives, so RA doesn't seem to 'see' through it a lot of the time. Best way to work with `prost` in my experience is...
If you don't need UTF-8 validation, you can change the type of the field to `bytes`, which will yield `Vec` and utf-8 validation will be skipped. This change is considered...
I don't agree that adding a field to a message being a backwards compatible wire change is sufficient motivation to also guarantee that it's a source-compatible change. There are plenty...
> This appears to work just fine Maybe that's an artifact of the type being in the same crate? I haven't used `#[non_exaustive]` in anger since it's a relatively new...
> The guidelines (also linked above) say that fields “may be added to existing APIs in the same version”, and also says a single version “must” be source- as well...
Also note that you could in theory attach a general purpose builder derive macro to `prost` generated types, e.g. https://crates.io/crates/derive_builder. I haven't tried this so maybe there's some sticking points,...
I use `prost-build` in a situation very similar to what this outlines, but it works fine in either case. Could you create a reproducing example in a repository and point...