mml/message/body/
mod.rs

1//! # Message body module
2//!
3//! A MML body can be compiled into a MIME body using the
4//! [MmlBodyCompiler] builder. A MIME body can be interpreted as a MML
5//! body using the [MimeBodyInterpreter] builder.
6
7#![allow(dead_code)]
8
9#[cfg(feature = "compiler")]
10pub mod compiler;
11#[cfg(feature = "interpreter")]
12pub mod interpreter;
13
14#[cfg(feature = "compiler")]
15#[doc(inline)]
16pub use self::compiler::MmlBodyCompiler;
17#[cfg(feature = "interpreter")]
18#[doc(inline)]
19pub use self::interpreter::{FilterParts, MimeBodyInterpreter};
20
21pub(crate) const PART_BEGIN: &str = "<#part";
22pub(crate) const PART_BEGIN_ESCAPED: &str = "<#!part";
23pub(crate) const PART_END: &str = "<#/part>";
24pub(crate) const PART_END_ESCAPED: &str = "<#!/part>";
25
26pub(crate) const MULTIPART_BEGIN: &str = "<#multipart";
27pub(crate) const MULTIPART_BEGIN_ESCAPED: &str = "<#!multipart";
28pub(crate) const MULTIPART_END: &str = "<#/multipart>";
29pub(crate) const MULTIPART_END_ESCAPED: &str = "<#!/multipart>";
30
31pub(crate) const ALTERNATIVE: &str = "alternative";
32pub(crate) const ATTACHMENT: &str = "attachment";
33pub(crate) const CHARSET: &str = "charset";
34pub(crate) const CREATION_DATE: &str = "creation-date";
35pub(crate) const DATA_ENCODING: &str = "data-encoding";
36pub(crate) const DESCRIPTION: &str = "description";
37pub(crate) const DISPOSITION: &str = "disposition";
38pub(crate) const ENCODING: &str = "encoding";
39pub(crate) const ENCODING_7BIT: &str = "7bit";
40pub(crate) const ENCODING_8BIT: &str = "8bit";
41pub(crate) const ENCODING_QUOTED_PRINTABLE: &str = "quoted-printable";
42pub(crate) const ENCODING_BASE64: &str = "base64";
43#[cfg(feature = "pgp")]
44pub(crate) const ENCRYPT: &str = "encrypt";
45pub(crate) const FILENAME: &str = "filename";
46pub(crate) const INLINE: &str = "inline";
47pub(crate) const MIXED: &str = "mixed";
48pub(crate) const MODIFICATION_DATE: &str = "modification-date";
49pub(crate) const NAME: &str = "name";
50#[cfg(feature = "pgp")]
51pub(crate) const PGP_MIME: &str = "pgpmime";
52pub(crate) const READ_DATE: &str = "read-date";
53#[cfg(feature = "pgp")]
54pub(crate) const RECIPIENTS: &str = "recipients";
55pub(crate) const RECIPIENT_FILENAME: &str = "recipient-filename";
56pub(crate) const RELATED: &str = "related";
57#[cfg(feature = "pgp")]
58pub(crate) const SENDER: &str = "sender";
59#[cfg(feature = "pgp")]
60pub(crate) const SIGN: &str = "sign";
61pub(crate) const SIZE: &str = "size";
62pub(crate) const TYPE: &str = "type";
63
64pub(crate) const BACKSLASH: char = '\\';
65pub(crate) const DOUBLE_QUOTE: char = '"';
66pub(crate) const GREATER_THAN: char = '>';
67pub(crate) const NEW_LINE: char = '\n';
68pub(crate) const SPACE: char = ' ';