Commit graph

4 commits

Author SHA1 Message Date
Rodolphe Breard
11f3712138 Add a context object the callbacks
Many filters requires to keep a state within a session. Although it not
currently possible to do so, the callback now accept a mutable object of
type NoContext. This is the first step, the next one will be to accept
any type that implements both Clone and Default.
An other step will be to allow the user to define different callback
parameters depending on his/her needs.
2019-01-12 00:17:59 +01:00
Rodolphe Breard
4ed4609272 Add a Response object
This object will abstract the filter response. For now, it only allow
not to respond. This will change in a future version.
2019-01-06 16:03:49 +01:00
Rodolphe Breard
21efb88331 Move the EventHandler from the client to the proc macro 2019-01-06 15:45:58 +01:00
Rodolphe Breard
789455668c 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.
2019-01-06 15:41:30 +01:00