Struct boot_loader_spec::BLSEntry
source · [−]pub struct BLSEntry {Show 16 fields
pub title: Option<BLSValue>,
pub version: Option<BLSValue>,
pub machine_id: Option<BLSValue>,
pub sort_key: Option<BLSValue>,
pub linux: BLSValue,
pub efi: Option<BLSValue>,
pub initrd: Vec<BLSValue>,
pub options: Vec<BLSValue>,
pub devicetree: Option<BLSValue>,
pub devicetree_overlay: Option<BLSValue>,
pub architecture: Option<BLSValue>,
pub grub_hotkey: Option<BLSValue>,
pub grub_users: Option<BLSValue>,
pub grub_class: Vec<BLSValue>,
pub grub_arg: Option<BLSValue>,
pub comments: Vec<String>,
}Expand description
BLSEntry represents the contents of a BLS entry file
Fields
title: Option<BLSValue>version: Option<BLSValue>machine_id: Option<BLSValue>sort_key: Option<BLSValue>linux: BLSValueefi: Option<BLSValue>initrd: Vec<BLSValue>options: Vec<BLSValue>devicetree: Option<BLSValue>devicetree_overlay: Option<BLSValue>architecture: Option<BLSValue>grub_hotkey: Option<BLSValue>grub_users: Option<BLSValue>grub_class: Vec<BLSValue>grub_arg: Option<BLSValue>comments: Vec<String>Implementations
sourceimpl BLSEntry
impl BLSEntry
sourcepub fn new() -> BLSEntry
pub fn new() -> BLSEntry
Allocates a new instance of BLSEntry, all optional members are initialized to None and linux is set with an empty string
sourcepub fn parse(buffer: &str) -> Result<BLSEntry, String>
pub fn parse(buffer: &str) -> Result<BLSEntry, String>
Parses a Boot Loader Spec entry UTF-8 buffer, returns a BLSEntry instance if successful, an error String if there was an error Note that any comment lines that are then rendered using BLSEntry::parse() will be pushed to the header of the file as the order commands and comments are not preserved.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BLSEntry
impl Send for BLSEntry
impl Sync for BLSEntry
impl Unpin for BLSEntry
impl UnwindSafe for BLSEntry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more