灵符lingfu

ling-web

↓ 986 downloads

Sessions, flash, templates, CSRF, static files — Flask-style

Keywords web, flask, sessions, csrf, templates
lingfu install ling-web
LicenseApache-2.0 OR MIT
AuthorsLing Lin, Sanny Lin
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

Code / Files (15)

src/blueprint.rs
use axum::Router;

/// Groups routes under a URL prefix — Flask's `Blueprint`, minus the
/// registration ceremony: it's a named wrapper over `Router::nest`.
pub fn blueprint<S>(prefix: &str, routes: Router<S>) -> Router<S>
where
    S: Clone + Send + Sync + 'static,
{
    Router::new().nest(prefix, routes)
}

← Back to index