Skip to main content

CpuidValue

Struct CpuidValue 

Source
pub struct CpuidValue<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout: LayoutOver<u32>>(/* private fields */);
Expand description

A marker for the CPUID layout associated with a particular leaf, subleaf, and output register.

The output register, REG, must be one of EAX, EBX, ECX, or EDX.

Implementations§

Source§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout: LayoutOver<u32>> CpuidValue<LEAF, SUBLEAF, REG, Layout>

Source

pub const fn new() -> Self

Source

pub const fn leaf(&self) -> u32

The associated leaf.

Despite being a part of the type itself, it is convenient to have this accessible as an accessor, given that it is expected that one would be primarily dealing in const Cpuid objects.

Source

pub const fn subleaf(&self) -> u32

The associated subleaf.

Despite being a part of the type itself, it is convenient to have this accessible as an accessor, given that it is expected that one would be primarily dealing in const Cpuid objects.

Trait Implementations§

Source§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout: Clone + LayoutOver<u32>> Clone for CpuidValue<LEAF, SUBLEAF, REG, Layout>

Source§

fn clone(&self) -> CpuidValue<LEAF, SUBLEAF, REG, Layout>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

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

Performs copy-assignment from source. Read more
Source§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout: Copy + LayoutOver<u32>> Copy for CpuidValue<LEAF, SUBLEAF, REG, Layout>

Source§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout: Debug + LayoutOver<u32>> Debug for CpuidValue<LEAF, SUBLEAF, REG, Layout>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout> Freeze for CpuidValue<LEAF, SUBLEAF, REG, Layout>

§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout> RefUnwindSafe for CpuidValue<LEAF, SUBLEAF, REG, Layout>
where Layout: RefUnwindSafe,

§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout> Send for CpuidValue<LEAF, SUBLEAF, REG, Layout>
where Layout: Send,

§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout> Sync for CpuidValue<LEAF, SUBLEAF, REG, Layout>
where Layout: Sync,

§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout> Unpin for CpuidValue<LEAF, SUBLEAF, REG, Layout>
where Layout: Unpin,

§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout> UnsafeUnpin for CpuidValue<LEAF, SUBLEAF, REG, Layout>

§

impl<const LEAF: u32, const SUBLEAF: u32, const REG: u8, Layout> UnwindSafe for CpuidValue<LEAF, SUBLEAF, REG, Layout>
where Layout: UnwindSafe,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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<Layout, Base> LayoutOver<Base> for Layout
where Layout: Copy + From<Base> + Into<Base>,

§

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

§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

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

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

Performs the conversion.