Add disabled-by-default insecure-tcp feature to tokio-xmpp for use by component connections

This commit is contained in:
moparisthebest 2024-01-01 01:13:51 -05:00
commit 019450ff4b
No known key found for this signature in database
GPG key ID: 88C93BFE27BC8229
9 changed files with 112 additions and 12 deletions

View file

@ -0,0 +1,26 @@
//! TCP ServerConnector Error
use core::fmt;
/// TCP ServerConnector Error
#[derive(Debug)]
pub enum Error {
/// tokio-xmpp error
TokioXMPP(crate::error::Error),
}
impl std::error::Error for Error {}
impl fmt::Display for Error {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match self {
Error::TokioXMPP(e) => write!(fmt, "TokioXMPP error: {}", e),
}
}
}
impl From<crate::error::Error> for Error {
fn from(e: crate::error::Error) -> Self {
Error::TokioXMPP(e)
}
}