melib: rename `imap_backend` feature to `imap`

pull/262/head
Manos Pitsidianakis 11 months ago
parent 51e9fbe8f2
commit 129f10911b
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -25,7 +25,7 @@ path = "src/lib.rs"
[[bin]] [[bin]]
name = "managesieve-client" name = "managesieve-client"
path = "src/managesieve.rs" path = "src/managesieve.rs"
required-features = ["melib/imap_backend"] required-features = ["melib/imap"]
[dependencies] [dependencies]
async-task = "^4.2.0" async-task = "^4.2.0"

@ -70,14 +70,14 @@ mailin-embedded = { version = "0.7", features = ["rtls"] }
stderrlog = "^0.5" stderrlog = "^0.5"
[features] [features]
default = ["unicode_algorithms", "imap_backend", "maildir_backend", "mbox_backend", "vcard", "smtp", "deflate_compression"] default = ["unicode_algorithms", "imap", "maildir_backend", "mbox_backend", "vcard", "smtp", "deflate_compression"]
debug-tracing = [] debug-tracing = []
deflate_compression = ["flate2", "imap-codec/ext_compress"] deflate_compression = ["flate2", "imap-codec/ext_compress"]
gpgme = [] gpgme = []
http = ["isahc"] http = ["isahc"]
http-static = ["isahc", "isahc/static-curl"] http-static = ["isahc", "isahc/static-curl"]
imap_backend = ["imap-codec", "tls"] imap = ["imap-codec", "tls"]
jmap_backend = ["http"] jmap_backend = ["http"]
maildir_backend = ["notify"] maildir_backend = ["notify"]
mbox_backend = ["notify"] mbox_backend = ["notify"]

@ -8,7 +8,7 @@ Library for handling mail.
| feature flag | dependencies | notes | | feature flag | dependencies | notes |
| ---------------------- | ----------------------------------- | ------------------------ | | ---------------------- | ----------------------------------- | ------------------------ |
| `imap_backend` | `native-tls` | | | `imap` | `native-tls` | |
| `deflate_compression` | `flate2` | for use with IMAP | | `deflate_compression` | `flate2` | for use with IMAP |
| `jmap_backend` | `isahc`, `native-tls`, `serde_json` | | | `jmap_backend` | `isahc`, `native-tls`, `serde_json` | |
| `maildir_backend` | `notify` | | | `maildir_backend` | `notify` | |

@ -22,9 +22,9 @@
pub mod utf7; pub mod utf7;
use smallvec::SmallVec; use smallvec::SmallVec;
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
pub mod imap; pub mod imap;
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
pub mod nntp; pub mod nntp;
#[cfg(feature = "notmuch_backend")] #[cfg(feature = "notmuch_backend")]
pub mod notmuch; pub mod notmuch;
@ -50,13 +50,13 @@ use std::{
use futures::stream::Stream; use futures::stream::Stream;
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
pub use self::imap::ImapType; pub use self::imap::ImapType;
#[cfg(feature = "maildir_backend")] #[cfg(feature = "maildir_backend")]
use self::maildir::MaildirType; use self::maildir::MaildirType;
#[cfg(feature = "mbox_backend")] #[cfg(feature = "mbox_backend")]
use self::mbox::MboxType; use self::mbox::MboxType;
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
pub use self::nntp::NntpType; pub use self::nntp::NntpType;
use super::email::{Envelope, EnvelopeHash, Flag}; use super::email::{Envelope, EnvelopeHash, Flag};
use crate::{ use crate::{
@ -174,7 +174,7 @@ impl Backends {
}, },
); );
} }
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
{ {
b.register( b.register(
"imap".to_string(), "imap".to_string(),

@ -110,7 +110,7 @@ pub use address::{Address, MessageID, References, StrBuild, StrBuilder};
pub use attachments::{Attachment, AttachmentBuilder}; pub use attachments::{Attachment, AttachmentBuilder};
pub use compose::{attachment_from_file, Draft}; pub use compose::{attachment_from_file, Draft};
pub use headers::*; pub use headers::*;
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
use imap_codec::{ use imap_codec::{
core::{AString, Atom, NonEmptyVec}, core::{AString, Atom, NonEmptyVec},
fetch::{MacroOrMessageDataItemNames, MessageDataItemName}, fetch::{MacroOrMessageDataItemNames, MessageDataItemName},
@ -126,7 +126,7 @@ use crate::{
TagHash, UnixTimestamp, TagHash, UnixTimestamp,
}; };
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
// [ref:TODO]: (#222) Make this `const` as soon as it is possible. // [ref:TODO]: (#222) Make this `const` as soon as it is possible.
pub(crate) fn common_attributes() -> MacroOrMessageDataItemNames<'static> { pub(crate) fn common_attributes() -> MacroOrMessageDataItemNames<'static> {
MacroOrMessageDataItemNames::MessageDataItemNames(vec![ MacroOrMessageDataItemNames::MessageDataItemNames(vec![
@ -187,7 +187,7 @@ impl Flag {
flag_impl!(fn is_draft, Self::DRAFT); flag_impl!(fn is_draft, Self::DRAFT);
flag_impl!(fn is_flagged, Self::FLAGGED); flag_impl!(fn is_flagged, Self::FLAGGED);
#[cfg(feature = "imap_backend")] #[cfg(feature = "imap")]
pub(crate) fn derive_imap_codec_flags(&self) -> Vec<ImapCodecFlag> { pub(crate) fn derive_imap_codec_flags(&self) -> Vec<ImapCodecFlag> {
let mut flags = Vec::new(); let mut flags = Vec::new();

@ -25,7 +25,7 @@ path = "src/mboxparse.rs"
[[bin]] [[bin]]
name = "imapshell" name = "imapshell"
path = "src/imapshell.rs" path = "src/imapshell.rs"
required-features = ["melib/imap_backend"] required-features = ["melib/imap"]
[[bin]] [[bin]]
name = "smtp_conn" name = "smtp_conn"

Loading…
Cancel
Save