Expand description
Represents XMPP addresses, also known as JabberIDs (JIDs) for the XMPP
protocol. A Jid can have between one and three parts in the form node@domain/resource:
- the (optional) node part designates a specific account/service on a server, for example
username@server.com - the domain part designates a server, for example
irc.jabberfr.org - the (optional) resource part designates a more specific client, such as a participant in a
groupchat (
jabberfr@chat.jabberfr.org/user) or a specific client device associated with an account (user@example.com/dino)
The Jid enum can be one of two variants, containing a more specific type:
BareJid(Jid::Barevariant): a JID without a resourceFullJid(Jid::Fullvariant): a JID with a resource
Jids as per the XMPP protocol only ever contain valid UTF-8. However, creating any form of Jid can fail in one of the following cases:
- wrong syntax: creating a Jid with an empty (yet declared) node or resource part, such as
@example.comoruser@example.com/ - stringprep error: some characters were invalid according to the stringprep algorithm, such as mixing left-to-write and right-to-left characters
Structs§
- BareJid
- A struct representing a bare Jabber ID, without a resource part.
- Domain
Part - The
DomainPartis the part between the (optional)@and the (optional)/in anyJid, whetherBareJidorFullJid. - Domain
Ref str-like type which conforms to the requirements ofDomainPart.- FullJid
- A struct representing a full Jabber ID, with a resource part.
- Jid
- A struct representing a Jabber ID (JID).
- Node
Part - The
NodePartis the optional part before the (optional)@in anyJid, whetherBareJidorFullJid. - NodeRef
str-like type which conforms to the requirements ofNodePart.- Resource
Part - The
ResourcePartis the optional part after the/in aJid. It is mandatory inFullJid. - Resource
Ref str-like type which conforms to the requirements ofResourcePart.
Enums§
- Error
- An error that signifies that a
Jidcannot be parsed from a string.