skim/output.rs
1use crate::event::Event;
2use crate::SkimItem;
3use std::sync::Arc;
4use tuikit::key::Key;
5
6pub struct SkimOutput {
7 /// The final event that makes skim accept/quit.
8 /// Was designed to determine if skim quit or accept.
9 /// Typically there are only two options: `Event::EvActAbort` | `Event::EvActAccept`
10 pub final_event: Event,
11
12 /// quick pass for judging if skim aborts.
13 pub is_abort: bool,
14
15 /// The final key that makes skim accept/quit.
16 /// Note that it might be Key::Null if it is triggered by skim.
17 pub final_key: Key,
18
19 /// The query
20 pub query: String,
21
22 /// The command query
23 pub cmd: String,
24
25 /// The selected items.
26 pub selected_items: Vec<Arc<dyn SkimItem>>,
27}