error: add docstrings

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-09-30 17:10:52 +02:00
parent bcc2f7d85e
commit d94d472b9d
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -21,12 +21,19 @@ use xmpp_parsers::{Error as ParserError, FullJid, Jid};
#[derive(Debug)]
pub enum Error {
/// Raised when editing an occupant with a non-matching session JID.
MismatchJids(Jid, Jid),
/// Raised when a new occupant tries to use a nickname already assigned in the room.
NickAlreadyAssigned(String),
/// Raised when editing or fetching an occupant with a session that isn't associated with the
/// occupant.
NonexistantSession(FullJid),
SessionAlreadyExists(FullJid),
/// Raised when fetching an occupant with a nickname that isn't assigned in the room.
ParticipantNotFound(String),
/// TokioXMPP errors
Xmpp(Box<TokioXMPPError>),
/// Parser errors
Parser(Box<ParserError>),
}