pub fn encode_server_value_body(
value: &ServerValue,
version: ProtocolVersion,
) -> Result<(ServerDiscriminant, Vec<u8>), CodecError>Expand description
Encodes a semantic server value’s exact v1 body.
The returned discriminant belongs with the returned body and cannot drift from the selected Rust variant.
§Errors
Returns CodecError::UnsupportedVersion for a version other than v1.0,
CodecError::LengthOverflow for a variable field that cannot fit its
canonical length prefix, or CodecError::InvalidValue when a typed value
violates a fixed wire invariant.