Skip to main content

parse_message_id

Function parse_message_id 

Source
pub fn parse_message_id(id: &str) -> Result<(String, u64), String>
Expand description

Parse a human-readable message ID back into (room_id, seq).

Expects the format "<room>:<seq>" produced by format_message_id. Splits on the last colon so room IDs that themselves contain colons are handled correctly (e.g. "namespace:room:42"("namespace:room", 42)).

Returns Err(String) if the input has no colon or if the part after the last colon cannot be parsed as a u64.