1use mlua::{FromLua, IntoLua, Lua, Value};
2use yazi_shared::event::CmdCow;
3
4#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
5pub struct VoidOpt;
6
7impl From<CmdCow> for VoidOpt {
8 fn from(_: CmdCow) -> Self { Self }
9}
10
11impl From<()> for VoidOpt {
12 fn from(_: ()) -> Self { Self }
13}
14
15impl FromLua for VoidOpt {
16 fn from_lua(_: Value, _: &Lua) -> mlua::Result<Self> { Ok(Self) }
17}
18
19impl IntoLua for VoidOpt {
20 fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.create_table()?.into_lua(lua) }
21}