Struct multiboot2::BootLoaderNameTag
source · [−]#[repr(C, packed)]pub struct BootLoaderNameTag { /* private fields */ }
Expand description
This tag contains the name of the bootloader that is booting the kernel.
The name is a normal C-style UTF-8 zero-terminated string that can be
obtained via the name
method.
Implementations
sourceimpl BootLoaderNameTag
impl BootLoaderNameTag
sourcepub fn name(&self) -> Result<&str, Utf8Error>
pub fn name(&self) -> Result<&str, Utf8Error>
Read the name of the bootloader that is booting the kernel.
This is an null-terminated UTF-8 string. If this returns Err
then perhaps the memory
is invalid or the bootloader doesn’t follow the spec.
Examples
ⓘ
if let Some(tag) = boot_info.boot_loader_name_tag() {
let name = tag.name();
assert_eq!("GRUB 2.02~beta3-5", name);
}
Trait Implementations
sourceimpl Clone for BootLoaderNameTag
impl Clone for BootLoaderNameTag
sourcefn clone(&self) -> BootLoaderNameTag
fn clone(&self) -> BootLoaderNameTag
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BootLoaderNameTag
impl Debug for BootLoaderNameTag
impl Copy for BootLoaderNameTag
Auto Trait Implementations
impl RefUnwindSafe for BootLoaderNameTag
impl Send for BootLoaderNameTag
impl Sync for BootLoaderNameTag
impl Unpin for BootLoaderNameTag
impl UnwindSafe for BootLoaderNameTag
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