yazi-plugin 26.5.6

Yazi plugin system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use mlua::{UserData, UserDataFields};
use yazi_shared::Id;

#[derive(Clone, Debug)]
pub(crate) struct Task {
	pub(super) id: Id,
}

impl UserData for Task {
	fn add_fields<F: UserDataFields<Self>>(fields: &mut F) {
		fields.add_field_method_get("id", |_, me| Ok(yazi_binding::Id(me.id)));
	}
}