yazi-proxy 0.2.4

Yazi event proxy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use tokio::sync::oneshot;
use yazi_config::popup::SelectCfg;
use yazi_shared::event::Cmd;

pub struct SelectOpt {
	pub cfg: SelectCfg,
	pub tx:  oneshot::Sender<anyhow::Result<usize>>,
}

impl TryFrom<Cmd> for SelectOpt {
	type Error = ();

	fn try_from(mut c: Cmd) -> Result<Self, Self::Error> { c.take_data().ok_or(()) }
}