#[repr(u8)]
pub enum SegmentRegister {
ES,
CS,
SS,
DS,
FS,
GS,
}
Expand description
Register 4 (FS
) and Register 5 (GS
) are defined on this enumeration but optimal encodings of them in combination with mnemonics exist and should be preferred as they increase code density.
Variants
ES
Register 0.
One of four Data Segment
registers, typically used for the destination of string instructions.
CS
Register 1.
Known as Code Segment
, used to fetch instructions from.
SS
Register 2.
Known as Stack Segment
, used for stack memory.
DS
Register 3.
One of four Data Segment
registers, this one is typically used for local data.
FS
Register 4.
One of four Data Segment
registers.
GS
Register 5.
One of four Data Segment
registers.
Trait Implementations
sourceimpl Clone for SegmentRegister
impl Clone for SegmentRegister
sourcefn clone(&self) -> SegmentRegister
fn clone(&self) -> SegmentRegister
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SegmentRegister
impl Debug for SegmentRegister
sourceimpl Default for SegmentRegister
impl Default for SegmentRegister
sourceimpl Hash for SegmentRegister
impl Hash for SegmentRegister
sourceimpl Into<u8> for SegmentRegister
impl Into<u8> for SegmentRegister
sourceimpl Ord for SegmentRegister
impl Ord for SegmentRegister
sourcefn cmp(&self, other: &SegmentRegister) -> Ordering
fn cmp(&self, other: &SegmentRegister) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<SegmentRegister> for SegmentRegister
impl PartialEq<SegmentRegister> for SegmentRegister
sourcefn eq(&self, other: &SegmentRegister) -> bool
fn eq(&self, other: &SegmentRegister) -> bool
sourceimpl PartialOrd<SegmentRegister> for SegmentRegister
impl PartialOrd<SegmentRegister> for SegmentRegister
sourcefn partial_cmp(&self, other: &SegmentRegister) -> Option<Ordering>
fn partial_cmp(&self, other: &SegmentRegister) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SegmentRegister
impl Eq for SegmentRegister
impl StructuralEq for SegmentRegister
impl StructuralPartialEq for SegmentRegister
Auto Trait Implementations
impl RefUnwindSafe for SegmentRegister
impl Send for SegmentRegister
impl Sync for SegmentRegister
impl Unpin for SegmentRegister
impl UnwindSafe for SegmentRegister
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more