Struct x86_64::structures::gdt::SegmentSelector
[−]
[src]
pub struct SegmentSelector(pub u16);
Specifies which element to load into a segment from descriptor tables (i.e., is a index to LDT or GDT table with some additional flags).
See Intel 3a, Section 3.4.2 "Segment Selectors"
Methods
impl SegmentSelector
[src]
const fn new(index: u16, rpl: PrivilegeLevel) -> SegmentSelector
Creates a new SegmentSelector
Arguments
index
: index in GDT or LDT array.rpl
: the requested privilege level
fn index(&self) -> u16
Returns the GDT index.
fn rpl(&self) -> PrivilegeLevel
Returns the requested privilege level.