pub struct Segment {
pub selector: u16,
pub base: u64,
pub limit: u32,
pub type_: u8,
pub dpl: u8,
pub present: bool,
pub db: bool,
pub l: bool,
pub unusable: bool,
}Expand description
One segment register, as the CPU sees it (selector plus the hidden, cached descriptor).
Fields§
§selector: u16The visible 16-bit selector.
base: u64The cached base address.
limit: u32The cached limit, already scaled by the granularity bit.
type_: u8Descriptor type field (4 bits).
dpl: u8Descriptor privilege level.
present: boolPresent bit.
db: boolDefault operation size (D/B bit): 32-bit when set.
l: boolLong-mode code segment (L bit).
unusable: boolThe segment register holds no usable descriptor.
Trait Implementations§
impl Copy for Segment
impl Eq for Segment
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more