melib: add `nntp` feature

pull/262/head
Manos Pitsidianakis 2023-07-22 21:01:42 +03:00
parent 7db930cabd
commit 89c90f224a
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
4 changed files with 9 additions and 4 deletions

View File

@ -76,6 +76,7 @@ notmuch = ["melib/notmuch", ]
jmap = ["melib/jmap",]
sqlite3 = ["melib/sqlite3"]
smtp = ["melib/smtp"]
smtp-trace = ["smtp", "melib/smtp-trace"]
regexp = ["pcre2"]
dbus-notifications = ["notify-rust",]
cli-docs = ["flate2"]

View File

@ -70,7 +70,7 @@ mailin-embedded = { version = "0.7", features = ["rtls"] }
stderrlog = "^0.5"
[features]
default = ["unicode_algorithms", "imap", "maildir", "mbox", "vcard", "smtp", "deflate_compression"]
default = ["unicode_algorithms", "imap", "nntp", "maildir", "mbox", "vcard", "smtp", "deflate_compression"]
debug-tracing = []
deflate_compression = ["flate2", "imap-codec/ext_compress"]
@ -79,6 +79,7 @@ http = ["isahc"]
http-static = ["isahc", "isahc/static-curl"]
imap = ["imap-codec", "tls"]
jmap = ["http"]
nntp = ["tls"]
maildir = ["notify"]
mbox = ["notify"]
notmuch = []

View File

@ -24,7 +24,7 @@ use smallvec::SmallVec;
#[cfg(feature = "imap")]
pub mod imap;
#[cfg(feature = "imap")]
#[cfg(feature = "nntp")]
pub mod nntp;
#[cfg(feature = "notmuch")]
pub mod notmuch;
@ -56,7 +56,7 @@ pub use self::imap::ImapType;
use self::maildir::MaildirType;
#[cfg(feature = "mbox")]
use self::mbox::MboxType;
#[cfg(feature = "imap")]
#[cfg(feature = "nntp")]
pub use self::nntp::NntpType;
use super::email::{Envelope, EnvelopeHash, Flag};
use crate::{
@ -180,6 +180,9 @@ impl Backends {
validate_conf_fn: Box::new(imap::ImapType::validate_config),
},
);
}
#[cfg(feature = "nntp")]
{
b.register(
"nntp".to_string(),
Backend {

View File

@ -28,7 +28,7 @@
use smallvec::SmallVec;
use crate::{get_conf_val, get_path_hash};
use crate::get_path_hash;
mod store;
pub use store::*;
#[macro_use]