diff options
| author | Fuwn <[email protected]> | 2023-04-03 03:06:26 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-04-03 03:06:26 +0000 |
| commit | 3c030a23833a650af890491ef6e969f93c94b466 (patch) | |
| tree | 3daa321ea0eafa5df57172d587b0d67d4a70f56a /examples | |
| parent | refactor(returnable): seperate contexts (diff) | |
| download | windmark-3c030a23833a650af890491ef6e969f93c94b466.tar.xz windmark-3c030a23833a650af890491ef6e969f93c94b466.zip | |
refactor(context): callback -> hook
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/windmark.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs index ed02192..c660f3f 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -23,7 +23,7 @@ extern crate log; use windmark::{ response::Response, - context::{CallbackContext, RouteContext}, + context::{HookContext, RouteContext}, success, Router, }; @@ -37,7 +37,7 @@ impl windmark::Module for Clicker { println!("clicker has been attached!"); } - fn on_pre_route(&mut self, context: CallbackContext<'_>) { + fn on_pre_route(&mut self, context: HookContext<'_>) { self.clicks += 1; info!( @@ -47,7 +47,7 @@ impl windmark::Module for Clicker { ); } - fn on_post_route(&mut self, context: CallbackContext<'_>) { + fn on_post_route(&mut self, context: HookContext<'_>) { info!( "clicker has been called post-route on {} with {} clicks!", context.url.path(), |