From d94d472b9d952d540c21cd9ee7a458107c597641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 30 Sep 2022 17:10:52 +0200 Subject: [PATCH] error: add docstrings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- src/error.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/error.rs b/src/error.rs index e5883c9..2af1b3a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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), + /// Parser errors Parser(Box), }