#[derive(Debug)]
pub enum GlobalLinuxModuleConfigurationError
{
#[allow(missing_docs)]
CouldNotChangeModprobeExecutablePath(io::Error),
ReloadingLinuxKernelModulesIsUnsupported,
#[allow(missing_docs)]
LinuxKernelModulesListParse(LinuxKernelModulesListParseError),
#[allow(missing_docs)]
CouldNotUnloadLinuxKernelModuleBecauseModuleUnloadingIsDisabled,
#[allow(missing_docs)]
CouldNotUnloadLinuxKernelModule(io::Error),
#[allow(missing_docs)]
CouldNotLoadLinuxKernelModuleBecauseModuleLoadingIsDisabled,
#[allow(missing_docs)]
CouldNotLoadLinuxKernelModuleUsingModprobe(ModProbeError),
#[allow(missing_docs)]
CouldNotDisableModuleLoadingAndUnloadingUntilNextReboot(io::Error),
#[allow(missing_docs)]
CouldNotConfigureModuleParameter
{
linux_kernel_module_name: LinuxKernelModuleName,
parameter_name: LinuxKernelModuleParameterName,
cause: io::Error,
},
}
impl Display for GlobalLinuxModuleConfigurationError
{
#[inline(always)]
fn fmt(&self, f: &mut Formatter) -> fmt::Result
{
Debug::fmt(self, f)
}
}
impl error::Error for GlobalLinuxModuleConfigurationError
{
#[inline(always)]
fn source(&self) -> Option<&(dyn error::Error + 'static)>
{
use self::GlobalLinuxModuleConfigurationError::*;
match self
{
&CouldNotChangeModprobeExecutablePath(ref cause) => Some(cause),
&ReloadingLinuxKernelModulesIsUnsupported => None,
&LinuxKernelModulesListParse(ref cause) => Some(cause),
&CouldNotUnloadLinuxKernelModuleBecauseModuleUnloadingIsDisabled => None,
&CouldNotUnloadLinuxKernelModule(ref cause) => Some(cause),
&CouldNotLoadLinuxKernelModuleUsingModprobe(ref cause) => Some(cause),
&CouldNotLoadLinuxKernelModuleBecauseModuleLoadingIsDisabled => None,
&CouldNotDisableModuleLoadingAndUnloadingUntilNextReboot(ref cause) => Some(cause),
&CouldNotConfigureModuleParameter { ref cause, .. } => Some(cause),
}
}
}
impl From<LinuxKernelModulesListParseError> for GlobalLinuxModuleConfigurationError
{
#[inline(always)]
fn from(cause: LinuxKernelModulesListParseError) -> Self
{
GlobalLinuxModuleConfigurationError::LinuxKernelModulesListParse(cause)
}
}
impl From<ModProbeError> for GlobalLinuxModuleConfigurationError
{
#[inline(always)]
fn from(cause: ModProbeError) -> Self
{
GlobalLinuxModuleConfigurationError::CouldNotLoadLinuxKernelModuleUsingModprobe(cause)
}
}