Struct procfs::KernelConfig
source · pub struct KernelConfig(pub HashMap<String, ConfigSetting>);
Expand description
The kernel configuration.
Tuple Fields§
§0: HashMap<String, ConfigSetting>
Trait Implementations§
source§impl Clone for KernelConfig
impl Clone for KernelConfig
source§fn clone(&self) -> KernelConfig
fn clone(&self) -> KernelConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Current for KernelConfig
impl Current for KernelConfig
source§fn current() -> ProcResult<Self>
fn current() -> ProcResult<Self>
Returns a configuration options used to build the currently running kernel
If CONFIG_KCONFIG_PROC is available, the config is read from /proc/config.gz
.
Else look in /boot/config-$(uname -r)
or /boot/config
(in that order).
Notes
Reading the compress /proc/config.gz
is only supported if the flate2
feature is enabled
(which it is by default).
The flate2 feature is currently enabled
const PATH: &'static str = PROC_CONFIG_GZ
source§impl Debug for KernelConfig
impl Debug for KernelConfig
source§impl<'de> Deserialize<'de> for KernelConfig
impl<'de> Deserialize<'de> for KernelConfig
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<KernelConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<KernelConfig, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromBufRead for KernelConfig
impl FromBufRead for KernelConfig
fn from_buf_read<R>(r: R) -> Result<KernelConfig, ProcError>where R: BufRead,
source§impl Serialize for KernelConfig
impl Serialize for KernelConfig
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for KernelConfig
impl Send for KernelConfig
impl Sync for KernelConfig
impl Unpin for KernelConfig
impl UnwindSafe for KernelConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more