1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # Ferro Inertia
//!
//! Server-side [Inertia.js](https://inertiajs.com) adapter for Rust web frameworks.
//!
//! This crate provides the core functionality for building Inertia.js responses
//! in Rust. It is framework-agnostic and can be integrated with any Rust web
//! framework (Axum, Actix-web, Rocket, etc.).
//!
//! ## Features
//!
//! - Framework-agnostic design via traits
//! - Async-safe (no thread-local storage)
//! - Partial reload support
//! - Shared props for auth, flash messages, CSRF tokens
//! - Version conflict detection (409 responses)
//! - Development mode with Vite HMR support
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use ferro_inertia::{Inertia, InertiaConfig, InertiaRequest};
//!
//! // Implement InertiaRequest for your framework's request type
//! impl InertiaRequest for MyRequest {
//! fn inertia_header(&self, name: &str) -> Option<&str> {
//! self.headers().get(name).and_then(|v| v.to_str().ok())
//! }
//! fn path(&self) -> &str {
//! self.uri().path()
//! }
//! }
//!
//! // In your handler
//! async fn index(req: MyRequest) -> MyResponse {
//! let response = Inertia::render(&req, "Home", serde_json::json!({
//! "title": "Welcome"
//! }));
//!
//! // Convert InertiaHttpResponse to your framework's response type
//! response.into()
//! }
//! ```
//!
//! ## Framework Integrations
//!
//! See the examples directory for integrations with popular frameworks:
//! - Axum
//! - Actix-web
//! - Hyper
pub use InertiaConfig;
pub use InertiaRequest;
pub use ;
pub use InertiaShared;
// Re-export serde_json for convenience
pub use serde_json;