use crate::error::ParseError;
use crate::events::ComponentEvent;
pub trait ComponentParser: Send + Sync {
fn parse(&self, message: &str) -> Result<ComponentEvent, ParseError>;
fn component_name(&self) -> &'static str;
fn can_parse(&self, _message: &str) -> bool {
true
}
}
pub mod anvil;
pub mod bounce;
pub mod cleanup;
pub mod discard;
pub mod error;
pub mod local;
pub mod master;
pub mod pickup;
pub mod postfix_script;
pub mod postlogd;
pub mod postmap;
pub mod postsuper;
pub mod proxymap;
pub mod qmgr;
pub mod relay;
pub mod sendmail;
pub mod smtp;
pub mod smtpd;
pub mod trivial_rewrite;
pub mod virtual_parser;
pub use bounce::BounceParser;
pub use cleanup::CleanupParser;
pub use error::ErrorParser;
pub use local::LocalParser;
pub use master::MasterParser;
pub use postfix_script::PostfixScriptParser;
pub use postmap::PostmapParser;
pub use postsuper::PostsuperParser;
pub use qmgr::QmgrParser;
pub use relay::RelayParser;
pub use smtp::SmtpParser;
pub use smtpd::SmtpdParser;
pub use virtual_parser::VirtualParser;