melib/backends: add extra_submission_headers field in MailBackendCapabilities struct

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
This commit is contained in:
Manos Pitsidianakis 2023-09-23 17:44:42 +03:00
parent 3d85ca2edf
commit e88957ae6e
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0
7 changed files with 8 additions and 1 deletions

View File

@ -37,7 +37,7 @@ use super::email::{Envelope, EnvelopeHash, Flag};
use crate::{
conf::AccountSettings,
error::{Error, ErrorKind, Result},
LogLevel,
HeaderName, LogLevel,
};
#[macro_export]
@ -328,6 +328,7 @@ pub struct MailBackendCapabilities {
pub supports_search: bool,
pub supports_tags: bool,
pub supports_submission: bool,
pub extra_submission_headers: &'static [HeaderName],
}
#[derive(Debug, Copy, Clone)]

View File

@ -292,6 +292,7 @@ impl MailBackend for ImapType {
extensions: Some(extensions),
supports_tags: true,
supports_submission: false,
extra_submission_headers: &[],
}
}

View File

@ -299,6 +299,7 @@ impl MailBackend for JmapType {
extensions: None,
supports_tags: true,
supports_submission: true,
extra_submission_headers: &[],
};
let supports_submission: bool = self
.store

View File

@ -186,6 +186,7 @@ impl MailBackend for MaildirType {
extensions: None,
supports_tags: false,
supports_submission: false,
extra_submission_headers: &[],
};
CAPABILITIES
}

View File

@ -836,6 +836,7 @@ impl MailBackend for MboxType {
extensions: None,
supports_tags: false,
supports_submission: false,
extra_submission_headers: &[],
};
CAPABILITIES
}

View File

@ -217,6 +217,7 @@ impl MailBackend for NntpType {
extensions: Some(extensions),
supports_tags: false,
supports_submission,
extra_submission_headers: &[HeaderName::NEWSGROUPS],
}
}

View File

@ -603,6 +603,7 @@ impl MailBackend for NotmuchDb {
extensions: None,
supports_tags: true,
supports_submission: false,
extra_submission_headers: &[],
};
CAPABILITIES
}