mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 14:51:03 +00:00
22 lines
615 B
Rust
22 lines
615 B
Rust
use mlua::{ExternalError, FromLua, IntoLua, Lua, Value};
|
|
use serde::Deserialize;
|
|
use yazi_shared::{SStr, event::ActionCow};
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct DeprecateForm {
|
|
pub content: SStr,
|
|
}
|
|
|
|
impl TryFrom<ActionCow> for DeprecateForm {
|
|
type Error = anyhow::Error;
|
|
|
|
fn try_from(a: ActionCow) -> Result<Self, Self::Error> { Ok(a.deserialize()?) }
|
|
}
|
|
|
|
impl FromLua for DeprecateForm {
|
|
fn from_lua(_: Value, _: &Lua) -> mlua::Result<Self> { Err("unsupported".into_lua_err()) }
|
|
}
|
|
|
|
impl IntoLua for DeprecateForm {
|
|
fn into_lua(self, _: &Lua) -> mlua::Result<Value> { Err("unsupported".into_lua_err()) }
|
|
}
|