Skip to main content

kernel_values

Macro kernel_values 

macro_rules! kernel_values {
    (
        $(#[$meta:meta])*
        pub struct $name:ident($repr:ty);
        $(
            $(#[$const_meta:meta])*
            const $const:ident = $value:expr;
        )*
    ) => { ... };
}
Expand description

Defines a newtype over a kernel integer with named values.

The type keeps the layout of the integer and accepts any value, because the kernel can report values that this crate doesn’t know. Debug prints the name of a known value.