pub struct SegmentSelector(/* private fields */);
Expand description
Segment selector (what goes into a segment register)
Implementations§
Source§impl SegmentSelector
impl SegmentSelector
Sourcepub const fn rpl(&self) -> u8
pub const fn rpl(&self) -> u8
Request Privilege Level (ring 0-3, where 0 is the highest)
Bits: 0..2
Sourcepub const fn with_rpl_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_rpl_checked(self, value: u8) -> Result<Self, ()>
Request Privilege Level (ring 0-3, where 0 is the highest)
Bits: 0..2
Sourcepub const fn with_rpl(self, value: u8) -> Self
pub const fn with_rpl(self, value: u8) -> Self
Request Privilege Level (ring 0-3, where 0 is the highest)
Bits: 0..2
Sourcepub const fn set_rpl(&mut self, value: u8)
pub const fn set_rpl(&mut self, value: u8)
Request Privilege Level (ring 0-3, where 0 is the highest)
Bits: 0..2
Sourcepub const fn set_rpl_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_rpl_checked(&mut self, value: u8) -> Result<(), ()>
Request Privilege Level (ring 0-3, where 0 is the highest)
Bits: 0..2
Sourcepub const fn with_ti_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_ti_checked(self, value: bool) -> Result<Self, ()>
Table indicator: 0 - GDT, 1 - LDT
Bits: 2..3
Sourcepub const fn set_ti_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_ti_checked(&mut self, value: bool) -> Result<(), ()>
Table indicator: 0 - GDT, 1 - LDT
Bits: 2..3
Sourcepub const fn with_index_checked(self, value: u16) -> Result<Self, ()>
pub const fn with_index_checked(self, value: u16) -> Result<Self, ()>
Index in the descriptor table
Bits: 3..16
Sourcepub const fn with_index(self, value: u16) -> Self
pub const fn with_index(self, value: u16) -> Self
Index in the descriptor table
Bits: 3..16
Trait Implementations§
Source§impl Clone for SegmentSelector
impl Clone for SegmentSelector
Source§fn clone(&self) -> SegmentSelector
fn clone(&self) -> SegmentSelector
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SegmentSelector
impl Debug for SegmentSelector
Source§impl Default for SegmentSelector
impl Default for SegmentSelector
Source§impl From<SegmentSelector> for u16
impl From<SegmentSelector> for u16
Source§fn from(v: SegmentSelector) -> u16
fn from(v: SegmentSelector) -> u16
Converts to this type from the input type.
Source§impl From<u16> for SegmentSelector
impl From<u16> for SegmentSelector
Source§impl PartialEq for SegmentSelector
impl PartialEq for SegmentSelector
impl Copy for SegmentSelector
impl Eq for SegmentSelector
impl StructuralPartialEq for SegmentSelector
Auto Trait Implementations§
impl Freeze for SegmentSelector
impl RefUnwindSafe for SegmentSelector
impl Send for SegmentSelector
impl Sync for SegmentSelector
impl Unpin for SegmentSelector
impl UnwindSafe for SegmentSelector
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