pub struct VersionInfo(/* private fields */);Expand description
The layout of EAX in VERSION_INFO.
Implementations§
Source§impl VersionInfo
impl VersionInfo
Sourcepub const RSVD1_MASK: u32
pub const RSVD1_MASK: u32
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u32
pub const RSVD0_MASK: u32
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u32
pub const DEFAULT: u32
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const EXTENDED_FAMILY_MASK: u32
pub const EXTENDED_FAMILY_MASK: u32
Unshifted bitmask of extended_family.
Sourcepub const EXTENDED_FAMILY_SHIFT: usize = 20
pub const EXTENDED_FAMILY_SHIFT: usize = 20
Bit shift (i.e., the low bit) of extended_family.
Sourcepub const EXTENDED_MODEL_MASK: u32
pub const EXTENDED_MODEL_MASK: u32
Unshifted bitmask of extended_model.
Sourcepub const EXTENDED_MODEL_SHIFT: usize = 16
pub const EXTENDED_MODEL_SHIFT: usize = 16
Bit shift (i.e., the low bit) of extended_model.
Sourcepub const INTEL_PROCESSOR_MASK: u32
pub const INTEL_PROCESSOR_MASK: u32
Unshifted bitmask of intel_processor.
Sourcepub const INTEL_PROCESSOR_SHIFT: usize = 12
pub const INTEL_PROCESSOR_SHIFT: usize = 12
Bit shift (i.e., the low bit) of intel_processor.
Sourcepub const BASE_FAMILY_MASK: u32
pub const BASE_FAMILY_MASK: u32
Unshifted bitmask of base_family.
Sourcepub const BASE_FAMILY_SHIFT: usize = 8
pub const BASE_FAMILY_SHIFT: usize = 8
Bit shift (i.e., the low bit) of base_family.
Sourcepub const BASE_MODEL_MASK: u32
pub const BASE_MODEL_MASK: u32
Unshifted bitmask of base_model.
Sourcepub const BASE_MODEL_SHIFT: usize = 4
pub const BASE_MODEL_SHIFT: usize = 4
Bit shift (i.e., the low bit) of base_model.
Sourcepub const STEPPING_MASK: u32
pub const STEPPING_MASK: u32
Unshifted bitmask of stepping.
Sourcepub const STEPPING_SHIFT: usize = 0
pub const STEPPING_SHIFT: usize = 0
Bit shift (i.e., the low bit) of stepping.
Sourcepub const FIELDS: [FieldMetadata<u32>; 6]
pub const FIELDS: [FieldMetadata<u32>; 6]
Metadata of all named fields in the layout.
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new instance with reserved-as-1 bits set and
all other bits zeroed (i.e., with a value of
Self::RSVD1_MASK).
pub const fn bits(self) -> u32
Sourcepub const fn extended_family(&self) -> u8
pub const fn extended_family(&self) -> u8
The value of VersionInfo[27:20].
Sourcepub const fn set_extended_family(&mut self, value: u8) -> &mut Self
pub const fn set_extended_family(&mut self, value: u8) -> &mut Self
Sets the value of VersionInfo[27:20].
Sourcepub const fn extended_model(&self) -> u8
pub const fn extended_model(&self) -> u8
The value of VersionInfo[19:16].
Sourcepub const fn set_extended_model(&mut self, value: u8) -> &mut Self
pub const fn set_extended_model(&mut self, value: u8) -> &mut Self
Sets the value of VersionInfo[19:16].
Sourcepub fn intel_processor(&self) -> IntelProcessorTypewhere
IntelProcessorType: TryFromBytes,
pub fn intel_processor(&self) -> IntelProcessorTypewhere
IntelProcessorType: TryFromBytes,
The value of VersionInfo[13:12].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_intel_processor to recover from invalid bit patterns.
Sourcepub fn try_intel_processor(&self) -> Result<IntelProcessorType, InvalidBits<u8>>where
IntelProcessorType: TryFromBytes,
pub fn try_intel_processor(&self) -> Result<IntelProcessorType, InvalidBits<u8>>where
IntelProcessorType: TryFromBytes,
Fallible variant of Self::intel_processor.
Sourcepub fn set_intel_processor(&mut self, value: IntelProcessorType) -> &mut Self
pub fn set_intel_processor(&mut self, value: IntelProcessorType) -> &mut Self
Sets the value of VersionInfo[13:12].
Sourcepub const fn base_family(&self) -> u8
pub const fn base_family(&self) -> u8
The value of VersionInfo[11:8].
Sourcepub const fn set_base_family(&mut self, value: u8) -> &mut Self
pub const fn set_base_family(&mut self, value: u8) -> &mut Self
Sets the value of VersionInfo[11:8].
Sourcepub const fn base_model(&self) -> u8
pub const fn base_model(&self) -> u8
The value of VersionInfo[7:4].
Sourcepub const fn set_base_model(&mut self, value: u8) -> &mut Self
pub const fn set_base_model(&mut self, value: u8) -> &mut Self
Sets the value of VersionInfo[7:4].
Sourcepub const fn set_stepping(&mut self, value: u8) -> &mut Self
pub const fn set_stepping(&mut self, value: u8) -> &mut Self
Sets the value of VersionInfo[3:0].
Source§impl VersionInfo
impl VersionInfo
Source§impl VersionInfo
impl VersionInfo
pub fn family(self) -> u8
pub fn model(self) -> u8
Sourcepub fn microarchitecture(self, vendor: Vendor) -> Microarchitecture
pub fn microarchitecture(self, vendor: Vendor) -> Microarchitecture
Attempts to derives the microarchitecture with the assumption that the system relates to a particular vendor.
Trait Implementations§
Source§impl Binary for VersionInfo
impl Binary for VersionInfo
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
Source§impl Clone for VersionInfo
impl Clone for VersionInfo
Source§fn clone(&self) -> VersionInfo
fn clone(&self) -> VersionInfo
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for VersionInfo
Source§impl Debug for VersionInfo
impl Debug for VersionInfo
Source§impl Default for VersionInfo
impl Default for VersionInfo
Source§fn default() -> Self
fn default() -> Self
Returns an instance with the default bits set (i.e,. with a
value of Self::DEFAULT.
impl Eq for VersionInfo
Source§impl From<VersionInfo> for u32
impl From<VersionInfo> for u32
Source§fn from(value: VersionInfo) -> Self
fn from(value: VersionInfo) -> Self
Source§impl From<u32> for VersionInfo
impl From<u32> for VersionInfo
Source§impl IntoIterator for VersionInfo
impl IntoIterator for VersionInfo
Source§impl<'a> IntoIterator for &'a VersionInfo
impl<'a> IntoIterator for &'a VersionInfo
Source§impl LowerHex for VersionInfo
impl LowerHex for VersionInfo
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
Source§impl Octal for VersionInfo
impl Octal for VersionInfo
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
Source§impl PartialEq for VersionInfo
impl PartialEq for VersionInfo
impl StructuralPartialEq for VersionInfo
Source§impl UpperHex for VersionInfo
impl UpperHex for VersionInfo
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
IntelProcessorType: Debug,
Auto Trait Implementations§
impl Freeze for VersionInfo
impl RefUnwindSafe for VersionInfo
impl Send for VersionInfo
impl Sync for VersionInfo
impl Unpin for VersionInfo
impl UnsafeUnpin for VersionInfo
impl UnwindSafe for VersionInfo
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)