Struct multiboot2::CommandLineTag
source · [−]#[repr(C, packed)]pub struct CommandLineTag { /* private fields */ }
Expand description
This tag contains the command line string.
The string is a normal C-style UTF-8 zero-terminated string that can be
obtained via the command_line
method.
Implementations
sourceimpl CommandLineTag
impl CommandLineTag
sourcepub fn command_line(&self) -> Result<&str, Utf8Error>
pub fn command_line(&self) -> Result<&str, Utf8Error>
Read the command line string that is being passed to the booting 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.command_line_tag() {
let command_line = tag.command_line();
assert_eq!("/bootarg", command_line);
}
Trait Implementations
sourceimpl Clone for CommandLineTag
impl Clone for CommandLineTag
sourcefn clone(&self) -> CommandLineTag
fn clone(&self) -> CommandLineTag
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 CommandLineTag
impl Debug for CommandLineTag
impl Copy for CommandLineTag
Auto Trait Implementations
impl RefUnwindSafe for CommandLineTag
impl Send for CommandLineTag
impl Sync for CommandLineTag
impl Unpin for CommandLineTag
impl UnwindSafe for CommandLineTag
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