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:
parent
dd7f4d1a86
commit
4b1f99db7e
6 changed files with 75 additions and 18 deletions
|
@ -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"
|
||||
|
|
Reference in a new issue