yazi/yazi-parser/src/input/recall.rs
2026-07-06 18:43:08 +08:00

24 lines
652 B
Rust

use mlua::{ExternalError, FromLua, IntoLua, Lua, Value};
use serde::Deserialize;
use yazi_shared::event::ActionCow;
use yazi_widgets::Step;
#[derive(Clone, Copy, Debug, Deserialize)]
pub struct RecallForm {
#[serde(alias = "0")]
pub step: Step,
}
impl TryFrom<ActionCow> for RecallForm {
type Error = anyhow::Error;
fn try_from(a: ActionCow) -> Result<Self, Self::Error> { Ok(a.deserialize()?) }
}
impl FromLua for RecallForm {
fn from_lua(_: Value, _: &Lua) -> mlua::Result<Self> { Err("unsupported".into_lua_err()) }
}
impl IntoLua for RecallForm {
fn into_lua(self, _: &Lua) -> mlua::Result<Value> { Err("unsupported".into_lua_err()) }
}