rustnext/
lib.rs

1pub mod app;
2pub mod router;
3pub mod handler;
4pub mod middleware;
5pub mod request;
6pub mod response;
7pub mod server;
8pub mod static_files;
9pub mod template;
10pub mod auth;
11pub mod cache;
12pub mod compression;
13pub mod database;
14pub mod file_upload;
15pub mod metrics;
16pub mod session;
17pub mod ui;
18pub mod forms;
19pub mod api;
20pub mod config;
21pub mod assets;
22pub mod error; // New module export
23pub mod logging; // New module export
24
25// Optional dev module for development utilities
26#[cfg(feature = "dev")]
27pub mod dev;
28
29pub use app::App;
30pub use router::{Router, Route};
31pub use handler::Handler;
32pub use middleware::{Middleware, Logger, Cors};
33pub use request::Request;
34pub use response::Response;
35pub use server::Server;
36
37// UI exports
38pub use ui::*;
39
40// Form exports
41pub use forms::*;
42
43// API exports
44pub use api::*;
45
46// Config exports
47pub use config::*;
48
49// Asset exports
50pub use assets::*;
51
52// Error exports
53pub use error::{AppError, IntoResponse}; // Export AppError and IntoResponse trait
54
55// Logging exports
56pub use logging::init_logging; // Export init_logging function
57
58// Re-export commonly used types
59pub use hyper::{Body, Method, StatusCode};
60pub use serde::{Deserialize, Serialize};
61pub use serde_json::{json, Value};
62pub use async_trait::async_trait;
63
64// Re-export global state getters
65pub use config::{get_config, init_config};
66pub use database::{get_database, init_database};
67pub use cache::{get_cache, init_cache};