pub struct SegmentDescriptorFlags(/* private fields */);
Available on x86 or x86-64 only.
Expand description

Settings for SegmentDescriptors.

Implementations§

source§

impl SegmentDescriptorFlags

source

pub fn os_defined(&self) -> bool

AVL: Ignored bit that can be used by the operating system.

Does not apply to call gates.

source

pub fn granularity(&self) -> bool

G: Indicates that the segment limit is in units of 4KB. Otherwise, it is in bytes.

source

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.

source

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.

source

pub fn set_granularity(&mut self, value: bool)

G: Indicates that the segment limit is in units of 4KB. Otherwise, it is in bytes.

source

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

§

fn new(value: T) -> Self

Construct a new bitfield type from its underlying representation
§

fn value(self) -> T

Unwrap the bitfield into its underlying representation
source§

impl Clone for SegmentDescriptorFlags

source§

fn clone(&self) -> SegmentDescriptorFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SegmentDescriptorFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SegmentDescriptorFlags

source§

fn default() -> SegmentDescriptorFlags

Returns the “default value” for a type. Read more
source§

impl DescriptorFlags for SegmentDescriptorFlags

source§

fn system_type(&self) -> SystemDescriptorType

If this is a system descriptor, indicates which type. Read more
source§

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

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

If this is a data descriptor, indicates that this segment is writable. Read more
source§

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 more
source§

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

Indicates whether this is a code (true) or data (false) descriptor. Read more
source§

fn is_application(&self) -> bool

S: Indicates that this is an application section descriptor if true. Otherwise, this is a system descriptor.
source§

fn privilege_level(&self) -> u8

DPL: The privilege level associated with the segment. Read more
source§

fn present(&self) -> bool

P: Indicates that the segment is defined.
source§

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 more
source§

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 more
source§

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

If this is a system descriptor, indicates which type. Read more
source§

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

The processor sets this bit whenever a segment register points to this segment. Read more
source§

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

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)

If this is a data descriptor, indicates that this segment is writable. Read more
source§

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)

If this is a code descriptor, indicates that this segment can be executed with lower privileges than privilege_level. Read more
source§

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 more
source§

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

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)

Indicates whether this is a code (true) or data (false) descriptor. Read more
source§

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)

S: Indicates that this is an application section descriptor if true. Otherwise, this is a system descriptor.
source§

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.
source§

fn set_privilege_level(&mut self, value: u8)

DPL: The privilege level associated with the segment. Read more
source§

fn with_privilege_level(&self, value: u8) -> Self

DPL: The privilege level associated with the segment. Read more
source§

fn set_present(&mut self, value: bool)

P: Indicates that the segment is defined.
source§

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)

Available on x86-64 only.
L: If this is a code segment, indicates that it should be executed in 64-bit mode. Read more
source§

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 more
source§

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 more
source§

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 more
source§

fn fmt_fields(&self, f: &mut DebugStruct<'_, '_>)

Print this object’s bitfield values. Helper method for Debug implementations.
source§

fn is_gate(&self) -> bool

Indicates that this is a GateDescriptor.
source§

impl From<SegmentDescriptorFlags> for u32

source§

fn from(val: SegmentDescriptorFlags) -> Self

Converts to this type from the input type.
source§

impl From<u32> for SegmentDescriptorFlags

source§

fn from(val: u32) -> Self

Converts to this type from the input type.
source§

impl PartialEq for SegmentDescriptorFlags

source§

fn eq(&self, other: &SegmentDescriptorFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SegmentDescriptorFlags

source§

impl Eq for SegmentDescriptorFlags

source§

impl StructuralPartialEq for SegmentDescriptorFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.