aipack 0.8.25

Command Agent runner to accelerate production coding with genai.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::support::W;
use mlua::IntoLua;

impl IntoLua for W<markex::tag::TagElem> {
	/// Converts the `TagElem` instance into a Lua Value
	fn into_lua(self, lua: &mlua::Lua) -> mlua::Result<mlua::Value> {
		let this = self.0;

		let table = lua.create_table()?;
		table.set("tag", this.tag)?;
		table.set("attrs", this.attrs)?; // Note: Lua might need handling for Option<HashMap>
		table.set("content", this.content)?;
		Ok(mlua::Value::Table(table))
	}
}