libstrophe 0.20.3

Rust ergonomic wrapper for libstrophe
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0597]: `handler` does not live long enough
 --> src/tests/fail/add_short_lived_handler.rs:6:20
  |
4 |     let handler = |_: &Context, conn: &mut Connection, _: ConnectionEvent| {
  |                                 ---- has type `&mut Connection<'1, '_>`
5 |         let handler = |_: &Context, _: &mut Connection, _: &Stanza| HandlerResult::RemoveHandler;
  |             ------- binding `handler` declared here
6 |         conn.handler_add(&handler, None, None, None);
  |         -----------------^^^^^^^^-------------------
  |         |                |
  |         |                borrowed value does not live long enough
  |         argument requires that `handler` is borrowed for `'1`
7 |     };
  |     - `handler` dropped here while still borrowed