oneof_field_get_packed_size() function
Calculate the serialized size of a single oneof message field, including the space needed by the preceding tag. Returns 0 if the oneof field isn't selected or is not set.
Arguments
field
Field descriptor for member.
oneof_case
Enum value that selects the field in the oneof.
Return value
Number of bytes required.