runique 1.1.25

A Django-inspired web framework for Rust with ORM, templates, and comprehensive security middleware
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::utils::aliases::ARlockmap;
use std::collections::HashMap;
use std::sync::{Arc, RwLock};
use tower_http::services::ServeDir;

pub fn new<T>(value: T) -> Arc<T> {
    Arc::new(value)
}

pub fn new_registry() -> ARlockmap {
    Arc::new(RwLock::new(HashMap::new()))
}

pub fn new_serve<P: AsRef<std::path::Path>>(path: P) -> ServeDir {
    ServeDir::new(path)
}