adminx 0.2.6

A powerful, modern admin panel framework for Rust built on Actix Web and MongoDB with automatic CRUD, role-based access control, and a beautiful responsive UI
Documentation
1
2
3
4
5
6
7
use actix_web::error::ErrorInternalServerError;
use actix_web::Error;
use mongodb::bson::{to_bson, Bson};

pub fn convert_to_bson<T: serde::Serialize>(value: &T) -> Result<Bson, Error> {
    to_bson(value).map_err(ErrorInternalServerError)
}