pub fn encode_fetch_snapshot_answer(
top_level_error: i16,
partition: Option<FetchSnapshotPartition>,
leader: &QuorumLeader,
version: i16,
) -> BytesExpand description
Encodes a FetchSnapshot response body (api 59) at version, as Kafka’s
RaftUtil.singletonFetchSnapshotResponse builds it.
partition None is Kafka’s bare top-level error response,
FetchSnapshotResponse.withTopLevelError. Otherwise NodeEndpoints names
the leader when the leader and its endpoint are known.