nidrs 0.4.0

Nidrs is a web framework based on axum and tokio.
Documentation
1
2
3
4
5
6
7
8
use crate::{AppError, AppResult};

pub fn otr<T>(option: Option<T>, error: &'static str) -> AppResult<T> {
    match option {
        Some(value) => Ok(value),
        None => Err(AppError::CompilationError(error.to_string())),
    }
}