mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
27 lines
652 B
Rust
27 lines
652 B
Rust
use mlua::{ExternalError, FromLua, IntoLua, Lua, Value};
|
|
use yazi_shared::event::ActionCow;
|
|
|
|
#[derive(Debug)]
|
|
pub struct RemoveForm {
|
|
pub force: bool,
|
|
pub permanently: bool,
|
|
pub hovered: bool,
|
|
}
|
|
|
|
impl From<ActionCow> for RemoveForm {
|
|
fn from(a: ActionCow) -> Self {
|
|
Self {
|
|
force: a.bool("force"),
|
|
permanently: a.bool("permanently"),
|
|
hovered: a.bool("hovered"),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl FromLua for RemoveForm {
|
|
fn from_lua(_: Value, _: &Lua) -> mlua::Result<Self> { Err("unsupported".into_lua_err()) }
|
|
}
|
|
|
|
impl IntoLua for RemoveForm {
|
|
fn into_lua(self, _: &Lua) -> mlua::Result<Value> { Err("unsupported".into_lua_err()) }
|
|
}
|