Skip to main content

encode_reaction_counts

Function encode_reaction_counts 

Source
pub fn encode_reaction_counts(entries: Vec<(char, u32)>, total: u32) -> String
Expand description

Encodes reactions into the canonical wire format. Sorts and truncates entries in place so callers can’t accidentally pass unsorted data. Returns “” when total == 0.