#[repr(transparent)]
pub struct Selector(_);
Available on x86 or x86-64 only.
Expand description

A reference to an entry in a segment descriptor table.

Used as the value of the segment registers CS, DS, etc. as well as the LocalDescriptorTableRegister and TaskRegister.

Implementations§

RPL: The privilege level “requested” when accessing the referenced segment.

This may be different than the current privilege level (CPL), in which case the access must allowed for both the CPL and RPL. This is intended to allow OS code to limit its privileges when executing on behalf of user code.

Indicates that this selector references a descriptor in the local descriptor table (LDT). Otherwise, it references the global descriptor table (GDT).

RPL: The privilege level “requested” when accessing the referenced segment.

This may be different than the current privilege level (CPL), in which case the access must allowed for both the CPL and RPL. This is intended to allow OS code to limit its privileges when executing on behalf of user code.

RPL: The privilege level “requested” when accessing the referenced segment.

This may be different than the current privilege level (CPL), in which case the access must allowed for both the CPL and RPL. This is intended to allow OS code to limit its privileges when executing on behalf of user code.

Indicates that this selector references a descriptor in the local descriptor table (LDT). Otherwise, it references the global descriptor table (GDT).

Indicates that this selector references a descriptor in the local descriptor table (LDT). Otherwise, it references the global descriptor table (GDT).

Create a new selector with the given field values

Create a null selector

The offset of the referenced segment entry in the descriptor table.

Update the offset of the referenced entry in the descriptor table.

Panics

Panics if the new offset is not aligned on an 8-byte boundary.

Calculate the address of the descriptor referenced by this selector

Trait Implementations§

Construct a new bitfield type from its underlying representation
Unwrap the bitfield into its underlying representation
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.