Expected: A message with a oneof can refer to a map of itself.
Observed: An opaque error message
error[E0596]: cannot borrow `value` as mutable, as it is not declared as mutable
--> src/value_wrapper.rs:11:28
|
11 | #[derive(Clone, PartialEq, prost::Oneof)]
| ^^^^^^^^^^^^ cannot borrow as mutable
|
= note: this error originates in the derive macro `prost::Oneof` (in Nightly builds, run with -Z macro-backtrace for more info)
I carefully referenced https://github.com/tokio-rs/prost/blob/master/tests/src/message_encoding.rs . This is likely PBKAC but I seem to be missing something here. I have no field named "value" and I'm not sure how to inspect this procedural macro. I use VS Code and Rust Analyzer doesn't have an option to expand the macro to show what's happening.
I'm not using a .proto. This is my source code for dependency prost = { version = "0.13" }
I don't have experience with using derive prost::OneOf. If you model this in a .proto, does that work? Is the generated code any different from the example?
Expected: A
message
with aoneof
can refer to a map of itself.Observed: An opaque error message
Source
I carefully referenced https://github.com/tokio-rs/prost/blob/master/tests/src/message_encoding.rs . This is likely PBKAC but I seem to be missing something here. I have no field named "value" and I'm not sure how to inspect this procedural macro. I use VS Code and Rust Analyzer doesn't have an option to expand the macro to show what's happening.
I'm not using a .proto. This is my source code for dependency
prost = { version = "0.13" }