Crates.io | hanger |
lib.rs | hanger |
version | 0.1.0 |
source | src |
created_at | 2019-05-10 02:19:34.182277 |
updated_at | 2019-05-10 02:19:34.182277 |
description | Attribute macro to put hooks around a function. |
homepage | https://github.com/overvenus/hanger |
repository | https://github.com/overvenus/hanger |
max_upload_size | |
id | 133189 |
size | 19,607 |
Call hooks before/after your functions.
Add this to your Cargo.toml:
[dependencies]
hanger = "0.1"
Add hooks to any functions.
fn hello() { print!("hello") }
#[hanger::hook(hello)]
fn world() { print!("world") }
world(); // It prints "helloworld".
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in hanger by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.