yazi-actor 26.1.22

Yazi actor model
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use anyhow::Result;
use yazi_dds::spark::SparkKind;
use yazi_shared::data::Data;

use crate::Ctx;

pub trait Actor {
	type Options;

	const NAME: &str;

	fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data>;

	fn hook(_cx: &Ctx, _opt: &Self::Options) -> Option<SparkKind> { None }
}