1#![deny(
16 missing_copy_implementations,
17 trivial_casts,
18 trivial_numeric_casts,
19 unsafe_code,
20 unstable_features,
21 unused_import_braces,
22 missing_debug_implementations,
23 missing_docs,
24 clippy::explicit_iter_loop,
25 clippy::unwrap_used,
26 clippy::expect_used,
27 clippy::indexing_slicing,
28 clippy::string_slice
29)]
30
31#[cfg(not(any(feature = "runtime-tokio", feature = "runtime-async-std")))]
32compile_error!("one of 'runtime-async-std' or 'runtime-tokio' features must be enabled");
33
34#[cfg(all(feature = "runtime-tokio", feature = "runtime-async-std"))]
35compile_error!("only one of 'runtime-async-std' or 'runtime-tokio' features must be enabled");
36
37pub mod authentication;
38mod codec;
39pub mod commands;
40pub mod error;
41pub mod extension;
42pub mod response;
43mod smtp_client;
44mod stream;
45mod types;
46pub mod util;
47pub use crate::smtp_client::{SmtpClient, SmtpTransport};
48pub use types::*;
49
50#[cfg(test)]
52#[macro_export]
53macro_rules! async_test {
54 ($name:ident, $block:block) => {
55 #[cfg(feature = "runtime-tokio")]
56 #[tokio::test]
57 async fn $name() {
58 $block
59 }
60
61 #[cfg(feature = "runtime-async-std")]
62 #[async_std::test]
63 async fn $name() {
64 $block
65 }
66 };
67}