Derek Benson
9bcd7087ae
Add support for instantiating Maps using proto!. Also adds an IntoProxied implementation for Maps that accepts an Iterator of (K, V), just like what we have for Repeated fields.
...
Migrates the helper functions used by the macro into __internal so that they are more hidden in Cargo.
PiperOrigin-RevId: 681004963
6 months ago
Protobuf Team Bot
0f02d8459b
Move `msg.merge_from(othermsg)` onto a trait fn
...
PiperOrigin-RevId: 659662640
8 months ago
Derek Benson
a6a0680e95
allow __ for inferred submessage types and implement array literal parsing in proto!.
...
PiperOrigin-RevId: 653628636
8 months ago
Derek Benson
91dfd8698a
add .. operator to proto! for merge_from. This mimics Rust's struct update syntax.
...
https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax
PiperOrigin-RevId: 648464577
9 months ago
Jakob Buchgraber
1a7ce61061
Split Proxied into Proxied and MutProxied traits.
...
Proxied is not marked as Sized yet, because ProtoStr is still dynamically sized. We will wait for clarity for the string types before marking Proxied Sized.
PiperOrigin-RevId: 627707544
11 months ago
Derek Benson
b4bd664b07
Rust: fix proto! msgtype matcher to look for :: separated idents instead of a ty to avoid syntax errors during parse
...
PiperOrigin-RevId: 626093074
11 months ago
Derek Benson
a2d4a4af2c
proto! doc comment and copyright
...
PiperOrigin-RevId: 626092060
11 months ago
Derek Benson
e485d4f03d
Adds an initial version of the proto! macro to simplify construction of proto messages in Rust. Currently supports all field types except Repeated and Map
...
PiperOrigin-RevId: 624995511
11 months ago