Crate elif_http

Source
Expand description

§elif-http

HTTP server core for the elif.rs LLM-friendly web framework.

This crate provides the fundamental HTTP server functionality including:

  • Axum-based HTTP server with async support
  • Integration with the elif-core DI container
  • Configuration management
  • Graceful shutdown handling
  • Health check endpoints

Re-exports§

pub use minimal_server::MinimalHttpServer;
pub use server_with_middleware::MiddlewareHttpServer;
pub use simple_stateful_server::SimpleStatefulHttpServer;
pub use config::HttpConfig;
pub use error::HttpError;
pub use error::HttpResult;
pub use routing::HttpMethod;
pub use routing::RouteInfo;
pub use routing::RouteRegistry;
pub use routing::ElifRouter;
pub use routing::Route;
pub use routing::RouteBuilder;
pub use routing::PathParams;
pub use routing::RouteParam;
pub use routing::ParamError;
pub use routing::ParamType;
pub use routing::RouteGroup;
pub use routing::GroupBuilder;
pub use request::ElifRequest;
pub use request::RequestExtractor;
pub use response::ElifResponse;
pub use response::ResponseBody;
pub use response::IntoElifResponse;
pub use json::ElifJson;
pub use json::JsonError;
pub use json::JsonResponse;
pub use json::ValidationErrors;
pub use json::ApiResponse;
pub use middleware::Middleware;
pub use middleware::MiddlewarePipeline;
pub use middleware::ErrorHandlingMiddleware;
pub use middleware::logging::LoggingMiddleware;
pub use middleware::timing::TimingMiddleware;
pub use middleware::timing::RequestStartTime;
pub use middleware::timing::format_duration;
pub use controller::Controller;
pub use controller::BaseController;
pub use controller::QueryParams;
pub use controller::PaginationMeta;
pub use database::DatabaseServiceProvider;
pub use database::create_database_pool;
pub use database::get_database_pool;
pub use database::get_named_database_pool;

Modules§

config
HTTP server configuration
controller
Service-Oriented Controller System
database
Database Integration - Service providers for database connectivity
error
HTTP server error types
json
JSON handling utilities for requests and responses
middleware
Middleware
minimal_server
Minimal working HTTP server
request
Request abstraction for handling HTTP requests
response
Response abstraction for building HTTP responses
routing
HTTP routing system for elif.rs
server_with_middleware
HTTP Server with Middleware Support
simple_stateful_server
Simple HTTP server with DI integration using closure approach
tests
Tests for HTTP server functionality

Structs§

HeaderMap
A set of HTTP headers
Json
JSON Extractor / Response.
Path
Extractor that will get captures from the URL and parse them using serde.
Query
Extractor that deserializes query strings into some type.
Router
The router type for composing handlers and services.
State
Extractor for state.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).

Type Aliases§

Response
Type alias for http::Response whose body type defaults to Body, the most common body type used with axum.