miltr_common/commands/
mod.rs

1//! Containing data to be taken `Action`s on.
2//!
3//! The milter client sends data via commands, including the data it received
4//! from the smtp session.
5
6mod body;
7mod connect;
8mod header;
9mod helo;
10mod mail;
11mod mmacro;
12mod recipient;
13mod unknown;
14
15use enum_dispatch::enum_dispatch;
16
17pub use self::body::{Body, EndOfBody};
18pub use self::connect::{Connect, Family};
19pub use self::header::{EndOfHeader, Header};
20pub use self::helo::Helo;
21pub use self::mail::{Data, Mail};
22pub use self::mmacro::Macro;
23pub use self::recipient::Recipient;
24pub use self::unknown::Unknown;
25
26/// See the respective contents about documentation
27#[allow(missing_docs)]
28#[enum_dispatch]
29#[cfg_attr(feature = "tracing", derive(strum::Display))]
30#[derive(Debug)]
31pub enum Command {
32    // SMTP opening
33    Connect,
34    Helo,
35    // Header
36    Mail,
37    Recipient,
38    Header,
39    EndOfHeader,
40    // Body
41    Data,
42    Body,
43    EndOfBody,
44    // Unknown
45    Unknown,
46}