2025-10-14 12:47:33 -07:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
use std::collections::BTreeMap;
|
|
|
|
|
|
2025-10-19 20:23:55 -07:00
|
|
|
/// 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.
|
2025-10-14 12:47:33 -07:00
|
|
|
#[derive(Serialize, Deserialize, Default, Clone)]
|
|
|
|
|
pub struct EntryDeclaration {
|
2025-10-19 20:23:55 -07:00
|
|
|
/// The title of the entry which will be display in the boot menu.
|
2025-10-14 12:47:33 -07:00
|
|
|
pub title: String,
|
2025-10-19 20:23:55 -07:00
|
|
|
/// The actions to run when the entry is selected.
|
2025-10-14 12:47:33 -07:00
|
|
|
#[serde(default)]
|
|
|
|
|
pub actions: Vec<String>,
|
2025-10-19 20:23:55 -07:00
|
|
|
/// The values to insert into the context when the entry is selected.
|
2025-10-14 12:47:33 -07:00
|
|
|
#[serde(default)]
|
|
|
|
|
pub values: BTreeMap<String, String>,
|
|
|
|
|
}
|