xmpp-rs/tokio-xmpp/src/lib.rs
Maxime “pep” Buquet a16f670ee6 tokio-xmpp: Error out when both tls-native and tls-rust features are enabled
If the user enables the tls-rust feature and forgets to disable
default-features (which includes tls-native), tell them and bail out.

The code was made to work anyway when both are enabled, and here it
defaults to tls-native. It does seem better to have one explicitely
choose one though hence the compile_error! message.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-10-24 16:51:08 +00:00

31 lines
965 B
Rust

//! XMPP implementation with asynchronous I/O using Tokio.
#![deny(unsafe_code, missing_docs, bare_trait_objects)]
#[cfg(all(feature = "tls-native", feature = "tls-rust"))]
compile_error!("Both tls-native and tls-rust features can't be enabled at the same time.");
mod starttls;
mod stream_start;
mod xmpp_codec;
pub use crate::xmpp_codec::Packet;
mod event;
pub use event::Event;
mod client;
mod happy_eyeballs;
pub mod stream_features;
pub mod xmpp_stream;
pub use client::{
async_client::Client as AsyncClient, async_client::Config as AsyncConfig,
async_client::ServerConfig as AsyncServerConfig, simple_client::Client as SimpleClient,
};
mod component;
pub use crate::component::Component;
mod error;
pub use crate::error::{AuthError, ConnecterError, Error, ParseError, ProtocolError};
pub use starttls::starttls;
// Re-exports
pub use minidom::Element;
pub use xmpp_parsers as parsers;
pub use xmpp_parsers::{BareJid, FullJid, Jid, JidParseError};