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

Settings for GateDescriptors.

Implementations§

source§

impl GateDescriptorFlags

source

pub fn call_param_count(&self) -> u8

Number of stack parameters to copy if the code segment referenced by a call gate uses a different stack segment.

Only applies to call gates.

source

pub fn interrupt_stack_index(&self) -> u8

Available on x86-64 only.

One-based index of the interrupt_stack pointer to use when handling an interrupt though this gate.

If this value is zero, then the stack segment is set to null.

Only applies to interrupt and trap gates.

source

pub fn set_call_param_count(&mut self, value: u8)

Number of stack parameters to copy if the code segment referenced by a call gate uses a different stack segment.

Only applies to call gates.

source

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

Number of stack parameters to copy if the code segment referenced by a call gate uses a different stack segment.

Only applies to call gates.

source

pub fn set_interrupt_stack_index(&mut self, value: u8)

Available on x86-64 only.

One-based index of the interrupt_stack pointer to use when handling an interrupt though this gate.

If this value is zero, then the stack segment is set to null.

Only applies to interrupt and trap gates.

source

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

Available on x86-64 only.

One-based index of the interrupt_stack pointer to use when handling an interrupt though this gate.

If this value is zero, then the stack segment is set to null.

Only applies to interrupt and trap gates.

Trait Implementations§

source§

impl Bitfield<u32> for GateDescriptorFlags

§

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 GateDescriptorFlags

source§

fn clone(&self) -> GateDescriptorFlags

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 GateDescriptorFlags

source§

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

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

impl Default for GateDescriptorFlags

source§

fn default() -> GateDescriptorFlags

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

impl DescriptorFlags for GateDescriptorFlags

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<GateDescriptorFlags> for u32

source§

fn from(val: GateDescriptorFlags) -> Self

Converts to this type from the input type.
source§

impl From<u32> for GateDescriptorFlags

source§

fn from(val: u32) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GateDescriptorFlags

source§

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

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

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

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

impl Copy for GateDescriptorFlags

source§

impl Eq for GateDescriptorFlags

source§

impl StructuralPartialEq for GateDescriptorFlags

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