Parent
[>]
1//! Route handlers, shared types, and router construction. 2//! 3//! This module defines the [`AppState`] injected into every handler, the 4//! [`RepoName`] path extractor (which validates against directory traversal), 5//! the [`Breadcrumb`] type used by tree/blame pages, and the [`router`] 6//! function that wires all 15 routes together. 7 8 9 10 11 12 13 14 15 16 17use HashMap; 18use ; 19 20use crate; 21use Router; 22use ; 23use header; 24use Parts; 25use IntoResponse; 26use get; 27use Serialize; 28 29/// A breadcrumb segment for the navigation bar. 30 31 35 36/// Builds breadcrumbs for a tree path. 37/// 38/// The root breadcrumb is always `"tree"`. Each path segment adds a breadcrumb 39/// linking to its corresponding subdirectory. 40 61 62/// Axum extractor that pulls the `{repo}` path parameter and validates it 63/// contains no path traversal components before passing it to handlers. 64; 65 66 91 92/// Shared application state passed to all route handlers. 93 94 100 101/// Serves the concatenated stylesheet. 102async 108 109/// Serves the favicon (SVG or ICO bytes loaded at startup). 110async 116 117/// Builds the application router with all routes and shared state attached. 118