2025-11-03 02:04:21 -05:00
|
|
|
use alloc::collections::BTreeMap;
|
|
|
|
|
use alloc::string::String;
|
|
|
|
|
use alloc::vec::Vec;
|
2025-11-02 23:28:31 -05:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
|
|
/// Declares a boot entry to display in the boot menu.
|
|
|
|
|
///
|
|
|
|
|
/// Entries are the user-facing concept of Sprout, making it possible
|
|
|
|
|
/// to run a set of actions with a specific context.
|
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
|
|
|
|
pub struct EntryDeclaration {
|
|
|
|
|
/// The title of the entry which will be display in the boot menu.
|
|
|
|
|
/// This is the pre-stamped value.
|
|
|
|
|
pub title: String,
|
|
|
|
|
/// The actions to run when the entry is selected.
|
|
|
|
|
#[serde(default)]
|
|
|
|
|
pub actions: Vec<String>,
|
|
|
|
|
/// The values to insert into the context when the entry is selected.
|
|
|
|
|
#[serde(default)]
|
|
|
|
|
pub values: BTreeMap<String, String>,
|
2025-12-21 14:11:26 -08:00
|
|
|
/// The key to sort entries, via version comparison.
|
|
|
|
|
#[serde(default, rename = "sort-key")]
|
|
|
|
|
pub sort_key: Option<String>,
|
2025-11-02 23:28:31 -05:00
|
|
|
}
|