pub fn from_u16(value: u16) -> PrivLvl
	{
		match value
		{
			// Ring 0
			0 => PrivLvl::R0,

			// Ring 1
			1 => PrivLvl::R1,

			// Ring 2
			2 => PrivLvl::R2,

			// Ring 3
			3 => PrivLvl::R3,
			// This error is returned if the specified value is outside of the accepted range.
			i => panic!("[ERR] INVALID PRIVILEGE LEVEL: {}", i),
		}
	}
// Create new PrivLvl, from a specific numeric value.
// NOTE: Value must be between 0 and 4.
Create new PrivLvl, from a specific numeric value.
NOTE: Value must be between 0 and 4.
Create new PrivLvl from a specific numeric value . NOTE : Value must be between 0 and 4 .
pub fn from_u16(value: u16) -> PrivLvl
	{
		match value
		{
			// Ring 0
			0 => PrivLvl::R0,
			// Ring 1
			1 => PrivLvl::R1,
			// Ring 2
			2 => PrivLvl::R2,
			// Ring 3
			3 => PrivLvl::R3,
			// This error is returned if the specified value is outside of the accepted range.
			i => panic!("[ERR] INVALID PRIVILEGE LEVEL: {}", i),
		}
	}
pub fn from_u16 ( value : u16 ) -> PrivLvl { match value { // Ring 0 0 => PrivLvl :: R0 , // Ring 1 1 => PrivLvl :: R1 , // Ring 2 2 => PrivLvl :: R2 , // Ring 3 3 => PrivLvl :: R3 , // This error is returned if the specified value is outside of the accepted range. i => panic ! ( " " i ) , } }
Create new PrivLvl, from a specific numeric value.
Create new PrivLvl from a specific numeric value .
value
u16