| Crates.io | iron_inspect |
| lib.rs | iron_inspect |
| version | 0.2.1 |
| created_at | 2017-10-16 08:59:47.712913+00 |
| updated_at | 2018-05-25 01:10:23.611592+00 |
| description | Inspect the result of Iron |
| homepage | |
| repository | https://github.com/KeenS/iron_inspect |
| max_upload_size | |
| id | 35848 |
| size | 5,440 |
Inspect the result of iron like below
let mut chain = Chain::new(handler);
chain.link_after(Inspect::new(|_req, res| match res {
Ok(r) => println!("ok: {:?}", r),
Err(e) => println!("err: {:?}", e),
}));
chain.link_after(Inspect::response(
|_req, res| println!("response: {:?}", res),
));
chain.link_after(Inspect::error(|_req, err| println!("error: {:?}", err)));