The KeyFlags bitflags represent the current state of a kernel key. These flags are used to identify if a key is instantiated, revoked, dead, or under construction. When parsing from string representations (like those found in /proc/keys), the flags are identified by specific characters: I (INSTANTIATED), R (REVOKED), D (DEAD), Q (QUOTA), U (UNDER_CONSTRUCTION), N (NEGATIVE), and i (INVALID).
// Example of how flags are represented in string format
// 'I' = INSTANTIATED, 'R' = REVOKED
let flags = KeyFlags::from_str("IR");