yazi-proxy 26.1.22

Yazi event proxy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use tokio::sync::mpsc;
use yazi_config::popup::InputCfg;
use yazi_macro::{emit, relay};
use yazi_shared::errors::InputError;

pub struct InputProxy;

impl InputProxy {
	pub fn show(cfg: InputCfg) -> mpsc::UnboundedReceiver<Result<String, InputError>> {
		let (tx, rx) = mpsc::unbounded_channel();
		emit!(Call(relay!(input:show).with_any("tx", tx).with_any("cfg", cfg)));
		rx
	}
}