Struct procfs::sys::kernel::BuildInfo [−][src]
Expand description
Represents a kernel build information
Fields
version: String
flags: HashSet<String>
extra: String
This field contains any extra data from the /proc/sys/kernel/version file. It generally contains the build date of the kernel, but the format of the date can vary.
A method named extra_date
is provided which would try to parse some date formats. When the date format is not supported, an error will be returned. It depends on chrono feature.
Implementations
Read the kernel build information from current running kernel
Generated by scripts/mkcompile_h
when building the kernel.
The file is located at /proc/sys/kernel/version
.
Return version number
This would parse number from first digits of version string. For example, #21~1 to 21.
Parse extra field to DateTime
object
This function may fail as TIMESTAMP can be various formats.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BuildInfo
impl UnwindSafe for BuildInfo
Blanket Implementations
Mutably borrows from an owned value. Read more