Crate cataclysm[][src]

Expand description

Cataclysm: A simple http framework

Cataclysm is a small personal project, an http framework influenced by actix-web, and built over tokio. A minimal working example is the following

extern crate cataclysm;
 
use cataclysm::{Server, Path, http::{Response, Method}};
 
async fn hello() -> Response {
    Response::ok().body("hello")
}
 
#[tokio::main]
async fn main() {
    let server = Server::builder(
        Path::new("/hello").with(Method::Get.to(hello))
    ).build();
 
    server.run("localhost:8000").await.unwrap();
}

Modules

Contains the specific functionality for http interaction

Structs

Main building block for cataclysm

Http Server instance

Enums

Pipeline type, contains either a layer or the core of the pipeline

Traits

Callback trait, for http callbacks

Extractor trait

Type Definitions

Type for the core handlers, that is, the ones that actually create a response

Type representing middleware functions