pub struct Item {
pub key: ItemKey,
pub id: Indice,
pub title: String,
pub subtitle: String,
pub icon: Option<Icon>,
pub category_icon: Option<Icon>,
pub window: Option<(Generation, Indice)>,
pub source: Source,
pub autocomplete: Option<String>,
pub score: f32,
}Expand description
A single row in the result list.
Fields§
§key: ItemKeyStable identity across queries. See the module docs.
id: Indicepop-launcher’s per-query index. Only valid for the query that produced this item, so it is refreshed on every update rather than remembered.
title: StringPrimary line — the application, file, or window name.
subtitle: StringSecondary line — the path, the command, the window’s application.
icon: Option<Icon>Leading icon, when the provider offered one.
category_icon: Option<Icon>Icon representing the plugin/category, shown trailing.
window: Option<(Generation, Indice)>Set when the result refers to an open window rather than a launchable.
source: SourceWhich provider produced this, and hence how it is activated.
autocomplete: Option<String>Text that replaces the query on Tab, Alfred’s autocomplete.
score: f32Ranking score after frecency is applied. Higher sorts first.
Implementations§
Source§impl Item
impl Item
Sourcepub fn from_search_result(result: SearchResult) -> Self
pub fn from_search_result(result: SearchResult) -> Self
Build an Item from a pop-launcher search result.
Sourcepub fn dismisses_on_activate(&self) -> bool
pub fn dismisses_on_activate(&self) -> bool
Whether activating this item should dismiss the launcher.
Calculator results are the notable exception: the user usually wants to copy the value and keep going.