Skip to main content

parse_jid_ref

Function parse_jid_ref 

Source
pub fn parse_jid_ref(s: &str) -> Option<JidRef<'_>>
Expand description

Parse the allocation-free JID shapes into the same borrowed type used by the binary decoder.

Returns None when the string needs Jid’s compatibility fallback or names an unknown server. Callers that must accept those edge cases can fall back to s.parse::<Jid>(); normal user/group/LID/bot JIDs stay borrowed.