Use procedural macros to define events
The construction of an EventHandler object should not be directly done by the client. Instead, it is easier to use procedural macro to automatize the process, hence exposing a nice and simple interface. Such use of procedural macros requires to crate an additional crate.
This commit is contained in:
parent
ccda4b1517
commit
789455668c
17 changed files with 1190 additions and 76 deletions
24
opensmtpd/Cargo.toml
Normal file
24
opensmtpd/Cargo.toml
Normal file
|
@ -0,0 +1,24 @@
|
|||
[package]
|
||||
name = "opensmtpd"
|
||||
version = "0.1.0"
|
||||
authors = ["Rodolphe Bréard <rodolphe@what.tf>"]
|
||||
edition = "2018"
|
||||
description = "Interface for OpenSMTPD filters"
|
||||
keywords = ["opensmtpd", "filter", "mail"]
|
||||
documentation = "https://docs.rs/opensmtpd/"
|
||||
repository = "https://github.com/breard-r/rust-opensmtpd"
|
||||
readme = "README.md"
|
||||
license = "CECILL-B"
|
||||
include = ["src/**/*", "Cargo.toml", "Licence_*.txt"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
nom = "4.1"
|
||||
opensmtpd_derive = { path = "../opensmtpd-derive", version="0.1" }
|
||||
|
||||
[[example]]
|
||||
name = "dummy"
|
||||
path = "examples/dummy.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.6"
|
Reference in a new issue