Crate ignitia

Crate ignitia 

Source
Expand description

§ignitia Web Framework

A blazing fast, lightweight web framework for Rust that ignitias your development. Built by Aarambh Dev Hub.

§Quick Start

use ignitia::{Router, Server, Request, Response, Result};

async fn hello() -> Result<Response> {
    Ok(Response::text("Hello from ignitia! 🔥"))
}

#[tokio::main]
async fn main() -> Result<()> {
    let router = Router::new()
        .get("/", hello);

    let server = Server::new(router, "127.0.0.1:3000".parse().unwrap());
    server.ignitia().await?;
    Ok(())
}

Re-exports§

pub use cookie::Cookie;
pub use cookie::CookieJar;
pub use cookie::SameSite;
pub use error::CustomError;
pub use error::Error;
pub use error::ErrorExt;
pub use error::ErrorHandler;
pub use error::ErrorHandlerType;
pub use error::ErrorHandlerWithRequest;
pub use error::ErrorResponse;
pub use error::Result;
pub use extension::Extension;
pub use extension::Extensions;
pub use handler::extractor::Body;
pub use handler::extractor::Cookies;
pub use handler::extractor::Headers;
pub use handler::extractor::Json;
pub use handler::extractor::Method as IgnitiaMethod;
pub use handler::extractor::Path;
pub use handler::extractor::Query;
pub use handler::extractor::Uri;
pub use handler::handler_fn;
pub use handler::into_handler;
pub use handler::raw_handler;
pub use handler::Handler;
pub use handler::HandlerFn;
pub use handler::IntoHandler;
pub use handler::RawRequest;
pub use middleware::AuthMiddleware;
pub use middleware::CorsMiddleware;
pub use middleware::ErrorHandlerMiddleware;
pub use middleware::LoggerMiddleware;
pub use middleware::Middleware;
pub use request::Request;
pub use response::Response;
pub use response::ResponseBuilder;
pub use router::Route;
pub use router::Router;
pub use server::Server;
pub use websocket::is_websocket_request;websocket
pub use websocket::upgrade_connection;websocket
pub use websocket::websocket_batch_handler;websocket
pub use websocket::websocket_handler;websocket
pub use websocket::websocket_message_handler;websocket
pub use websocket::BatchMessageHandler;websocket
pub use websocket::CloseFrame;websocket
pub use websocket::Message;websocket
pub use websocket::MessageType;websocket
pub use websocket::OptimizedMessageHandler;websocket
pub use websocket::WebSocketConnection;websocket
pub use websocket::WebSocketHandler;websocket

Modules§

cookie
error
extension
handler
middleware
request
response
router
server
utils
websocketwebsocket

Macros§

define_error

Structs§

HeaderMap
A set of HTTP headers
HeaderValue
Represents an HTTP header field value.
Method
The Request Method (VERB)
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).

Attribute Macros§

async_trait