Allow the use of custom context

The main goal of events/reports is to update a context object, which
will be used in filters to generate a response. It is now possible to
use any object implementing both Clone and Default as a context object.
It is also possible to define no context at all.
This commit is contained in:
Rodolphe Breard 2019-01-12 23:43:02 +01:00
parent dd7f4d1a86
commit 4b1f99db7e
6 changed files with 75 additions and 18 deletions

View file

@ -20,5 +20,9 @@ opensmtpd_derive = { path = "../opensmtpd-derive", version="0.1" }
name = "dummy"
path = "examples/dummy.rs"
[[example]]
name = "counter"
path = "examples/session_event_counter.rs"
[dev-dependencies]
env_logger = "0.6"