Struct tartan_arch::x86_common::protection::SegmentDescriptorFlags
source · #[repr(transparent)]pub struct SegmentDescriptorFlags(_);
Available on x86 or x86-64 only.
Expand description
Settings for SegmentDescriptor
s.
Implementations§
source§impl SegmentDescriptorFlags
impl SegmentDescriptorFlags
sourcepub fn os_defined(&self) -> bool
pub fn os_defined(&self) -> bool
AVL
: Ignored bit that can be used by the operating system.
Does not apply to call gates.
sourcepub fn granularity(&self) -> bool
pub fn granularity(&self) -> bool
G
: Indicates that the segment limit is in units of 4KB. Otherwise, it is in
bytes.
sourcepub fn set_os_defined(&mut self, value: bool)
pub fn set_os_defined(&mut self, value: bool)
AVL
: Ignored bit that can be used by the operating system.
Does not apply to call gates.
sourcepub fn with_os_defined(&mut self, value: bool) -> Self
pub fn with_os_defined(&mut self, value: bool) -> Self
AVL
: Ignored bit that can be used by the operating system.
Does not apply to call gates.
sourcepub fn set_granularity(&mut self, value: bool)
pub fn set_granularity(&mut self, value: bool)
G
: Indicates that the segment limit is in units of 4KB. Otherwise, it is in
bytes.
sourcepub fn with_granularity(&mut self, value: bool) -> Self
pub fn with_granularity(&mut self, value: bool) -> Self
G
: Indicates that the segment limit is in units of 4KB. Otherwise, it is in
bytes.
Trait Implementations§
source§impl Bitfield<u32> for SegmentDescriptorFlags
impl Bitfield<u32> for SegmentDescriptorFlags
source§impl Clone for SegmentDescriptorFlags
impl Clone for SegmentDescriptorFlags
source§fn clone(&self) -> SegmentDescriptorFlags
fn clone(&self) -> SegmentDescriptorFlags
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 SegmentDescriptorFlags
impl Debug for SegmentDescriptorFlags
source§impl Default for SegmentDescriptorFlags
impl Default for SegmentDescriptorFlags
source§fn default() -> SegmentDescriptorFlags
fn default() -> SegmentDescriptorFlags
Returns the “default value” for a type. Read more
source§impl DescriptorFlags for SegmentDescriptorFlags
impl DescriptorFlags for SegmentDescriptorFlags
source§fn system_type(&self) -> SystemDescriptorType
fn system_type(&self) -> SystemDescriptorType
If this is a system descriptor, indicates which type. Read more
source§fn application_accessed(&self) -> bool
fn application_accessed(&self) -> bool
The processor sets this bit whenever a segment register points to this
segment. Read more
source§fn code_readable(&self) -> bool
fn code_readable(&self) -> bool
If this is a code descriptor, indicates that the segment can be read.
Otherwise, it is execute-only. Read more
source§fn data_writable(&self) -> bool
fn data_writable(&self) -> bool
If this is a data descriptor, indicates that this segment is writable. Read more
source§fn code_conforming(&self) -> bool
fn code_conforming(&self) -> bool
If this is a code descriptor, indicates that this segment can be executed
with lower privileges than
privilege_level
. Read moresource§fn data_expand_down(&self) -> bool
fn data_expand_down(&self) -> bool
If this is a data descriptor, indicates that the segment expands toward lower
addresses (stack-like) if its limit is changed. Read more
source§fn is_code(&self) -> bool
fn is_code(&self) -> bool
Indicates whether this is a code (true) or data (false) descriptor. Read more
source§fn is_application(&self) -> bool
fn is_application(&self) -> bool
S
: Indicates that this is an application section descriptor if true.
Otherwise, this is a system descriptor. Read moresource§fn privilege_level(&self) -> u8
fn privilege_level(&self) -> u8
DPL
: The privilege level associated with the segment. Read moresource§fn code_mode_64(&self) -> bool
fn code_mode_64(&self) -> bool
Available on x86-64 only.
L
: If this is a code segment, indicates that it should be executed in 64-bit
mode. Read moresource§fn application_mode_32(&self) -> bool
fn application_mode_32(&self) -> bool
D
/B
: Indicates that the segment uses 32-bit mode. Otherwise, it is 16-bit,
unless code_mode_64
is set. Read moresource§fn set_system_type(&mut self, value: SystemDescriptorType)
fn set_system_type(&mut self, value: SystemDescriptorType)
If this is a system descriptor, indicates which type. Read more
source§fn with_system_type(&self, value: SystemDescriptorType) -> Self
fn with_system_type(&self, value: SystemDescriptorType) -> Self
If this is a system descriptor, indicates which type. Read more
source§fn set_application_accessed(&mut self, value: bool)
fn set_application_accessed(&mut self, value: bool)
The processor sets this bit whenever a segment register points to this
segment. Read more
source§fn with_application_accessed(&mut self, value: bool) -> Self
fn with_application_accessed(&mut self, value: bool) -> Self
The processor sets this bit whenever a segment register points to this
segment. Read more
source§fn set_code_readable(&mut self, value: bool)
fn set_code_readable(&mut self, value: bool)
If this is a code descriptor, indicates that the segment can be read.
Otherwise, it is execute-only. Read more
source§fn with_code_readable(&mut self, value: bool) -> Self
fn with_code_readable(&mut self, value: bool) -> Self
If this is a code descriptor, indicates that the segment can be read.
Otherwise, it is execute-only. Read more
source§fn set_data_writable(&mut self, value: bool)
fn set_data_writable(&mut self, value: bool)
If this is a data descriptor, indicates that this segment is writable. Read more
source§fn with_data_writable(&mut self, value: bool) -> Self
fn with_data_writable(&mut self, value: bool) -> Self
If this is a data descriptor, indicates that this segment is writable. Read more
source§fn set_code_conforming(&mut self, value: bool)
fn set_code_conforming(&mut self, value: bool)
If this is a code descriptor, indicates that this segment can be executed
with lower privileges than
privilege_level
. Read moresource§fn with_code_conforming(&mut self, value: bool) -> Self
fn with_code_conforming(&mut self, value: bool) -> Self
If this is a code descriptor, indicates that this segment can be executed
with lower privileges than
privilege_level
. Read moresource§fn set_data_expand_down(&mut self, value: bool)
fn set_data_expand_down(&mut self, value: bool)
If this is a data descriptor, indicates that the segment expands toward lower
addresses (stack-like) if its limit is changed. Read more
source§fn with_data_expand_down(&mut self, value: bool) -> Self
fn with_data_expand_down(&mut self, value: bool) -> Self
If this is a data descriptor, indicates that the segment expands toward lower
addresses (stack-like) if its limit is changed. Read more
source§fn set_is_code(&mut self, value: bool)
fn set_is_code(&mut self, value: bool)
Indicates whether this is a code (true) or data (false) descriptor. Read more
source§fn with_is_code(&mut self, value: bool) -> Self
fn with_is_code(&mut self, value: bool) -> Self
Indicates whether this is a code (true) or data (false) descriptor. Read more
source§fn set_is_application(&mut self, value: bool)
fn set_is_application(&mut self, value: bool)
S
: Indicates that this is an application section descriptor if true.
Otherwise, this is a system descriptor. Read moresource§fn with_is_application(&mut self, value: bool) -> Self
fn with_is_application(&mut self, value: bool) -> Self
S
: Indicates that this is an application section descriptor if true.
Otherwise, this is a system descriptor. Read moresource§fn set_privilege_level(&mut self, value: u8)
fn set_privilege_level(&mut self, value: u8)
DPL
: The privilege level associated with the segment. Read moresource§fn with_privilege_level(&self, value: u8) -> Self
fn with_privilege_level(&self, value: u8) -> Self
DPL
: The privilege level associated with the segment. Read moresource§fn set_present(&mut self, value: bool)
fn set_present(&mut self, value: bool)
P
: Indicates that the segment is defined.source§fn with_present(&mut self, value: bool) -> Self
fn with_present(&mut self, value: bool) -> Self
P
: Indicates that the segment is defined.source§fn set_code_mode_64(&mut self, value: bool)
fn set_code_mode_64(&mut self, value: bool)
Available on x86-64 only.
L
: If this is a code segment, indicates that it should be executed in 64-bit
mode. Read moresource§fn with_code_mode_64(&mut self, value: bool) -> Self
fn with_code_mode_64(&mut self, value: bool) -> Self
Available on x86-64 only.
L
: If this is a code segment, indicates that it should be executed in 64-bit
mode. Read moresource§fn set_application_mode_32(&mut self, value: bool)
fn set_application_mode_32(&mut self, value: bool)
D
/B
: Indicates that the segment uses 32-bit mode. Otherwise, it is 16-bit,
unless code_mode_64
is set. Read moresource§fn with_application_mode_32(&mut self, value: bool) -> Self
fn with_application_mode_32(&mut self, value: bool) -> Self
D
/B
: Indicates that the segment uses 32-bit mode. Otherwise, it is 16-bit,
unless code_mode_64
is set. Read moresource§fn fmt_fields(&self, f: &mut DebugStruct<'_, '_>)
fn fmt_fields(&self, f: &mut DebugStruct<'_, '_>)
Print this object’s bitfield values. Helper method for
Debug
implementations. Read moresource§fn is_gate(&self) -> bool
fn is_gate(&self) -> bool
Indicates that this is a
GateDescriptor
.source§impl From<SegmentDescriptorFlags> for u32
impl From<SegmentDescriptorFlags> for u32
source§fn from(val: SegmentDescriptorFlags) -> Self
fn from(val: SegmentDescriptorFlags) -> Self
Converts to this type from the input type.