Struct stivale_boot::v2::StivaleModuleTag
source · [−]#[repr(C)]pub struct StivaleModuleTag {
pub header: StivaleTagHeader,
pub module_len: u64,
pub modules_array: [StivaleModule],
}
Expand description
This tag is used to get the modules that the bootloader loaded alongside the kernel, if any.
Fields
header: StivaleTagHeader
module_len: u64
Length of the modules array.
modules_array: [StivaleModule]
The variable length modules array.
Implementations
sourceimpl StivaleModuleTag
impl StivaleModuleTag
sourcepub fn iter(&self) -> StivaleModuleIter<'_>ⓘNotable traits for StivaleModuleIter<'a>impl<'a> Iterator for StivaleModuleIter<'a> type Item = &'a StivaleModule;
pub fn iter(&self) -> StivaleModuleIter<'_>ⓘNotable traits for StivaleModuleIter<'a>impl<'a> Iterator for StivaleModuleIter<'a> type Item = &'a StivaleModule;
Returns an iterator over all the modules that were loaded.
sourcepub fn as_slice(&self) -> &[StivaleModule]
pub fn as_slice(&self) -> &[StivaleModule]
Return’s the modules array pointer as a rust slice.
sourcepub unsafe fn new_from_ptr_count(ptr: *mut (), module_count: u64) -> *mut Self
pub unsafe fn new_from_ptr_count(ptr: *mut (), module_count: u64) -> *mut Self
Safety
ptr
must be a pointer to a properly initialized StivaleModuleTag
struct with
module_count
entries in the modules_array