Add disabled-by-default insecure-tcp feature to tokio-xmpp for use by component connections
This commit is contained in:
parent
38bfba4a18
commit
019450ff4b
9 changed files with 112 additions and 12 deletions
26
tokio-xmpp/src/tcp/error.rs
Normal file
26
tokio-xmpp/src/tcp/error.rs
Normal 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)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue