lariv-rs 0.1.0

Compile-time plugin web application framework built on Axum, SeaORM, Maud, and HTMX
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Shared Axum state for blog routes (DB connection).
use sea_orm::DatabaseConnection;

/// Shared Axum state for the blog plugin routes.
#[derive(Clone)]
pub struct BlogState {
    pub db: DatabaseConnection,
}

impl BlogState {
    pub fn new(db: DatabaseConnection) -> Self {
        Self { db }
    }
}