rkt 0.6.0

Web framework with a focus on usability, security, extensibility, and speed. (Community Fork)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate rkt;

#[rkt::async_test]
async fn test_await_timer_inside_attach() {
    async fn do_async_setup() {
        // By using a timer or I/O resource, we ensure that do_async_setup will
        // deadlock if no thread is able to tick the time or I/O drivers.
        rkt::tokio::time::sleep(std::time::Duration::from_millis(100)).await;
    }

    let _ = rkt::build().attach(rkt::fairing::AdHoc::on_ignite("1", |rocket| async {
        do_async_setup().await;
        rocket
    }));
}