pub struct Config {Show 14 fields
pub title: Option<String>,
pub version: Option<String>,
pub machine_id: Option<MachineId>,
pub sort_key: Option<SortKey>,
pub options: Option<String>,
pub devicetree_path: Option<DevicetreePath>,
pub architecture: Option<Architecture>,
pub efi_path: Option<EfiPath>,
pub action: BootAction,
pub bad: bool,
pub fs_handle: Option<FsHandle>,
pub origin: Option<Parsers>,
pub filename: String,
pub suffix: String,
}
Expand description
The standard Config
Fields§
§title: Option<String>
The preferred boot name of the entry.
version: Option<String>
The version of the entry for sorting.
machine_id: Option<MachineId>
The machine-id for sorting.
sort_key: Option<SortKey>
The sort-key for sorting.
options: Option<String>
The options specified in loading the image.
devicetree_path: Option<DevicetreePath>
The path to a devicetree, if one is required.
architecture: Option<Architecture>
The architecture of the entry for filtering.
efi_path: Option<EfiPath>
The path to an EFI executable, if one is required.
action: BootAction
The BootAction
of the entry, for deciding which loader to use.
bad: bool
Checks if an entry is bad, for sorting and deranking.
This does not necessarily mean that it’s invalid, only that it’s known to fail.
fs_handle: Option<FsHandle>
The FsHandle
of the entry, if one is required.
origin: Option<Parsers>
The parser from which the entry originated from, if there was one.
filename: String
The filename of the entry.
suffix: String
The suffix of the filename of the entry.
Implementations§
Source§impl Config
impl Config
Sourcepub fn get_str_fields(
&self,
) -> impl Iterator<Item = (&'static str, Option<&str>)>
pub fn get_str_fields( &self, ) -> impl Iterator<Item = (&'static str, Option<&str>)>
Returns an iterator over every String
struct field that should be edited
Sourcepub fn get_preferred_title(&self, option: Option<usize>) -> String
pub fn get_preferred_title(&self, option: Option<usize>) -> String
Picks the preferred title for a Config
using one of three sources.
If the title of the Config
is found, then that is used and preferred because it indicates the preferred
name for the boot option.
If the title is not present, and the filename is not empty, then the filename is used. This is because it can
still indicate the source of a particular boot option or its origin.
If the filename is empty, then the index of the boot option is used. This is because at least some way of differentiating
the boot option from other boot options is required. This will only be the case if the index is provided.