Common/UserInterface/DTO/MessageOptionsDTO.rs
1//! # MessageOptionsDTO
2//!
3//! Defines the Data Transfer Object for the options of a user-facing message
4//! dialog.
5
6use serde::{Deserialize, Serialize};
7
8/// A serializable struct that holds all configuration options for a message
9/// shown to the user via `ShowMessage`.
10#[derive(Serialize, Deserialize, Debug, Clone, Default)]
11#[serde(rename_all = "PascalCase")]
12pub struct MessageOptionsDTO {
13 /// An optional title for the message dialog window.
14 #[serde(skip_serializing_if = "Option::is_none")]
15 pub Title:Option<String>,
16
17 /// If `true`, the message will be modal, blocking interaction with the
18 /// rest of the UI until it is dismissed.
19 #[serde(skip_serializing_if = "Option::is_none")]
20 pub IsModal:Option<bool>,
21
22 /// Optional, more detailed text to display in the message body.
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub Detail:Option<String>,
25
26 /// A list of string titles for action buttons to display on the message.
27 /// The selected button's title is returned by the `ShowMessage` effect.
28 #[serde(skip_serializing_if = "Option::is_none")]
29 pub ItemList:Option<Vec<String>>,
30}