pub enum Error {
EmptyJid,
EmptyLocal,
LongLocal,
ShortDomain,
LongDomain,
EmptyResource,
LongResource,
ForbiddenChars,
Addr(AddrParseError),
IDNA(Errors),
}
Expand description
Possible error values that can occur when parsing JIDs.
Variants§
EmptyJid
Returned if an empty string is being parsed.
EmptyLocal
Returned if the localpart is empty (eg. “@example.net”).
LongLocal
Returned if the localpart is longer than 1023 bytes.
ShortDomain
Returned if the domain part is too short to be a valid domain, hostname, or IP address.
LongDomain
Returned if the domain part is too long to be a valid domain.
EmptyResource
Returned if the resourcepart is empty (eg. “example.net/”
LongResource
Returned if the resourcepart is longer than 1023 bytes.
ForbiddenChars
Returned if a forbidden character was found in any part of the JID.
Addr(AddrParseError)
Returned if an error occured while attempting to parse the domainpart of the JID as an IPv6 address.
IDNA(Errors)
Returned if an error occured while performing IDNA2008 processing on the domainpart of the JID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more