pub fn decode_value(
kind: RecordKind,
bytes: Option<&[u8]>,
) -> Result<CoordinationRecord, RecordError>Expand description
Decodes a value of COORDINATION_STATE_TOPIC under the kind of its key.
bytes is None for a record with a null value, and the result is then
CoordinationRecord::Tombstone for either kind.
ยงErrors
Returns RecordError::Format when the buffer is truncated, when it holds
trailing bytes, when the version is not 0, when a string length is
negative, or when a string is not UTF-8. Returns RecordError::Empty or
RecordError::TooLong when the member is empty or too long. Returns
RecordError::NegativeFencingToken when a lease value carries a negative
producer id or producer epoch.