yazi_parser/input/
insert.rs1use mlua::{ExternalError, FromLua, IntoLua, Lua, Value};
2use yazi_shared::event::CmdCow;
3
4#[derive(Debug)]
5pub struct InsertOpt {
6 pub append: bool,
7}
8
9impl From<CmdCow> for InsertOpt {
10 fn from(c: CmdCow) -> Self { Self { append: c.bool("append") } }
11}
12
13impl From<bool> for InsertOpt {
14 fn from(append: bool) -> Self { Self { append } }
15}
16
17impl FromLua for InsertOpt {
18 fn from_lua(_: Value, _: &Lua) -> mlua::Result<Self> { Err("unsupported".into_lua_err()) }
19}
20
21impl IntoLua for InsertOpt {
22 fn into_lua(self, _: &Lua) -> mlua::Result<Value> { Err("unsupported".into_lua_err()) }
23}