Struct DescriptorBuilder

Source
pub struct DescriptorBuilder { /* private fields */ }
Expand description

Makes building descriptors easier (hopefully).

Implementations§

Source§

impl DescriptorBuilder

Source

pub fn limit_granularity_4kb(self) -> DescriptorBuilder

The segment limit is interpreted in 4-KByte units if this is set.

Source

pub fn present(self) -> DescriptorBuilder

Indicates whether the segment is present in memory (set) or not present (clear).

Source

pub fn dpl(self, dpl: Ring) -> DescriptorBuilder

Specifies the privilege level of the segment.

Source

pub fn avl(self) -> DescriptorBuilder

Toggle the AVL bit.

Source

pub fn db(self) -> DescriptorBuilder

Set default operation size (false for 16bit segment, true for 32bit segments).

Source

pub fn l(self) -> DescriptorBuilder

Set L bit if this descriptor is a 64-bit code segment. In IA-32e mode, bit 21 of the second doubleword of the segment descriptor indicates whether a code segment contains native 64-bit code. A value of 1 indicates instructions in this code segment are executed in 64-bit mode.

Source

pub fn ist(self, index: u8) -> DescriptorBuilder

Set a the interrupt stack table index (only if this ends up being a 64-bit interrupt descriptor).

Trait Implementations§

Source§

impl BuildDescriptor<Descriptor> for DescriptorBuilder

Source§

impl BuildDescriptor<Descriptor64> for DescriptorBuilder

Source§

impl Debug for DescriptorBuilder

Source§

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

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

impl GateDescriptorBuilder<u16> for DescriptorBuilder

Source§

impl GateDescriptorBuilder<u32> for DescriptorBuilder

Source§

impl GateDescriptorBuilder<u64> for DescriptorBuilder

Source§

impl LdtDescriptorBuilder<u32> for DescriptorBuilder

Source§

impl LdtDescriptorBuilder<u64> for DescriptorBuilder

Source§

impl SegmentDescriptorBuilder<u32> for DescriptorBuilder

Source§

impl TaskGateDescriptorBuilder for DescriptorBuilder

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

Source§

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

Source§

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.