Trait x86_64::registers::segmentation::Segment   
source · pub trait Segment {
    // Required methods
    fn get_reg() -> SegmentSelector;
    unsafe fn set_reg(sel: SegmentSelector);
}Expand description
An x86 segment
Segment registers on x86 are 16-bit SegmentSelectors, which index into
the GlobalDescriptorTable. The corresponding GDT entry is used to
configure the segment itself. Note that most segmentation functionality is
disabled in 64-bit mode. See the individual segments for more information.
Required Methods§
sourcefn get_reg() -> SegmentSelector
 
fn get_reg() -> SegmentSelector
Returns the current value of the segment register.
sourceunsafe fn set_reg(sel: SegmentSelector)
 
unsafe fn set_reg(sel: SegmentSelector)
Reload the segment register. Depending on the segment, this may also reconfigure the corresponding segment.
Safety
This function is unsafe because the caller must ensure that sel
is a valid segment descriptor, and that reconfiguring the segment will
not cause undefined behavior.
Object Safety§
This trait is not object safe.