Struct likemod::ModUnloader [−][src]
pub struct ModUnloader { /* fields omitted */ }
Module unloader.
Asynchronous methods can be enabled via the optional async
feature.
Methods
impl ModUnloader
[src]
impl ModUnloader
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a new default ModLoader
.
pub fn forced(self, force_unload: bool) -> Self
[src]
pub fn forced(self, force_unload: bool) -> Self
Set whether a forced unload should be performed.
A force unload will taint the kernel and can leave the host in an unstable state, or cause data loss.
pub fn unload_sync<S: AsRef<str>>(
&self,
modname: S,
blocking: bool
) -> Result<()>
[src]
pub fn unload_sync<S: AsRef<str>>(
&self,
modname: S,
blocking: bool
) -> Result<()>
Unload module by name, synchronously.
If blocking
is enabled, this can block at syscall level (putting
the process in D state) while waiting for module reference count
to be 0 for clean unloading (unless forced).
It is usually recommended not to set blocking
, as the process
cannot be killed while blocked on syscall. Consider using
unload_async
instead.
pub fn unload_async<S: AsRef<str>>(
&self,
modname: S,
pause_millis: NonZeroU64
) -> Box<Future<Item = (), Error = Error>>
[src]
pub fn unload_async<S: AsRef<str>>(
&self,
modname: S,
pause_millis: NonZeroU64
) -> Box<Future<Item = (), Error = Error>>
Unload module by name, asynchronously.
If the module is currently in use, this will continuously retry
unloading at fixed intervals after pausing for the specified
amount of milliseconds.
This requires enabling the async
optional feature.
Trait Implementations
impl Clone for ModUnloader
[src]
impl Clone for ModUnloader
fn clone(&self) -> ModUnloader
[src]
fn clone(&self) -> ModUnloader
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ModUnloader
[src]
impl Debug for ModUnloader
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for ModUnloader
[src]
impl Default for ModUnloader
Auto Trait Implementations
impl Send for ModUnloader
impl Send for ModUnloader
impl Sync for ModUnloader
impl Sync for ModUnloader