mlua-periphery 1.2.4

A Rust-native implementation of lua-periphery for mlua.
1
2
3
4
5
6
7
8
use crate::serial::Serial;
use mlua::Error::RuntimeError;
use mlua::{Error, Lua};

pub(super) fn handle(_lua: &Lua, serial: &Serial, _arg: mlua::Value) -> Result<mlua::Number, Error> {
    let _locked_port = serial.port.lock().map_err(|err| RuntimeError(err.to_string()))?;
    Err(RuntimeError("NIY".to_string()))
}