optional_field_get_packed_size() function
Calculate the serialized size of a single optional message field, including the space needed by the preceding tag. Returns 0 if the optional field isn't set.
Arguments
field
Field descriptor for member.
has
True if the field exists, false if not.
Return value
Number of bytes required.
![]()
rv += optional_field_get_packed_size(
optional_field_get_packed_size() is called by 1 function and calls 1 function:
![]()
optional_field_get_packed_size()
optional_field_get_packed_size() reads 4 variables:
![]()
optional_field_get_packed_size()