[−][src]Struct linapi::modules::ModuleFile
A Linux Kernel Module file on disk.
Methods
impl ModuleFile
[src]
pub fn from_name(name: &str) -> Self
[src]
pub fn from_path(path: &Path) -> Self
[src]
pub fn load(&self, param: &str) -> LoadedModule
[src]
Load this kernel module, and return the LoadedModule
describing it.
Arguments
param
eters for the kernel module. See module documentation for details, andinit_module(2)
for details on formatting.
Panics
- On failure
Note
Kernel modules may be compressed, and depending on crate features this function may automatically decompress it.
pub unsafe fn force_load(&self, param: &str) -> LoadedModule
[src]
Force load this kernel module, and return the LoadedModule
describing it.
Arguments
param
eters for the kernel module. See module documentation for details, andinit_module(2)
for details on formatting.
Safety
Force loading a kernel module is dangerous, it skips important safety checks that help ensure module compatibility with your kernel.
Note
Kernel modules may be compressed, and depending on crate features this function may automatically decompress it.
pub fn path(&self) -> &Path
[src]
pub fn name(&self) -> &str
[src]
pub fn info(&self) -> ModInfo
[src]
Get information embedded in the module file.
Note
This uses the .modinfo
ELF section, which seems to be entirely
undocumented.
Kernel modules also may be compressed, and depending on crate features, this function may automatically decompress it.
pub fn has_signature(&self) -> bool
[src]
Whether the module has a signature.
This does not check if it's valid.
Note
This is a temporary API.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ModuleFile
impl Send for ModuleFile
impl Sync for ModuleFile
impl Unpin for ModuleFile
impl UnwindSafe for ModuleFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,