nitr 0.0.0-beta.0

A dynamic web server written in Rust with Lua scripting support.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use mlua::{Function, Lua, Value};

use crate::error::{Context, Result};

/// Debug function.
pub(crate) fn create_debug_fn(lua: &Lua) -> Result<Function> {
    lua.create_function(|_, value: Value| {
        println!("[debug] {value:#?}");
        Ok(())
    })
    .with_context(|| "debug_fn: error printing the value")
}