roa 0.6.1

async web framework inspired by koajs, lightweight but powerful.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod dispatcher;
mod guard;

use crate::http::{Method, StatusCode};
use crate::{throw, Result};

#[inline]
fn method_not_allowed(method: &Method) -> Result {
    throw!(
        StatusCode::METHOD_NOT_ALLOWED,
        format!("Method {} not allowed", method)
    )
}

pub use dispatcher::{connect, delete, get, head, options, patch, post, put, trace, Dispatcher};
pub use guard::{allow, deny, Guard};