Common/UserInterface/DTO/QuickPickItemDTO.rs
1//! # QuickPickItemDTO
2//!
3//! Defines the Data Transfer Object for a single item in a quick pick list.
4
5use serde::{Deserialize, Serialize};
6
7/// A serializable struct that represents a single selectable item within a
8/// quick pick UI.
9#[derive(Serialize, Deserialize, Debug, Clone, Default)]
10#[serde(rename_all = "PascalCase")]
11pub struct QuickPickItemDTO {
12 /// The primary text label for the item.
13 pub Label:String,
14
15 /// An optional description shown in a separate column to the right of the
16 /// label.
17 #[serde(skip_serializing_if = "Option::is_none")]
18 pub Description:Option<String>,
19
20 /// An optional detail text shown underneath the label.
21 #[serde(skip_serializing_if = "Option::is_none")]
22 pub Detail:Option<String>,
23
24 /// If `true`, this item will be initially selected.
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub Picked:Option<bool>,
27
28 /// If `true`, this item will always be shown at the top of the list, even
29 /// when filtering.
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub AlwaysShow:Option<bool>,
32}