pub struct Version(/* private fields */);
Expand description
Value of the VERSION
register in the local APIC.
Implementations§
Source§impl Version
impl Version
Sourcepub const VERSION: Pack32<u8, Version>
pub const VERSION: Pack32<u8, Version>
The version numbers of the local APIC:
- 0XH: 82489DX discrete APIC. -10H - 15H: Integrated APIC. Other values reserved.
Sourcepub const MAX_LVT: Pack32<u8, Version>
pub const MAX_LVT: Pack32<u8, Version>
The maximum number of LVT entries in the local APIC, minus one.
For the Pentium 4 and Intel Xeon processors (which have 6 LVT entries), the value returned in the Max LVT field is 5; for the P6 family processors (which have 5 LVT entries), the value returned is 4; for the Pentium processor (which has 4 LVT entries), the value returned is 3. For processors based on the Nehalem microarchitecture (which has 7 LVT entries) and onward, the value returned is 6.
Sourcepub const EOI_SUPPRESSION: Pack32<bool, Version>
pub const EOI_SUPPRESSION: Pack32<bool, Version>
Indicates whether software can inhibit the broadcast of EOI message by setting bit 12 of the Spurious Interrupt Vector Register; see Section 12.8.5 and Section 12.9. in Ch. 7 of Vol. 3A of the Intel SDM for details.
Sourcepub const fn from_bits(bits: u32) -> Version
pub const fn from_bits(bits: u32) -> Version
Constructs a new instance of Self
from the provided raw bits.
Sourcepub fn with<T>(self, field: Pack32<T, Version>, value: T) -> Version
pub fn with<T>(self, field: Pack32<T, Version>, value: T) -> Version
Packs the bit representation of value
into self
at the bit
range designated by field
, returning a new bitfield.
Sourcepub fn set<T>(&mut self, field: Pack32<T, Version>, value: T) -> &mut Version
pub fn set<T>(&mut self, field: Pack32<T, Version>, value: T) -> &mut Version
Packs the bit representation of value
into self
at the range
designated by field
, mutating self
in place.
Sourcepub fn get<T>(self, field: Pack32<T, Version>) -> T
pub fn get<T>(self, field: Pack32<T, Version>) -> T
Unpacks the bit range represented by field
from self
, and
converts it into a T
-typed value.
§Panics
This method panics if self
does not contain a valid bit
pattern for a T
-typed value, as determined by T
’s
FromBits::try_from_bits
implementation.
Sourcepub fn try_get<T>(
self,
field: Pack32<T, Version>,
) -> Result<T, <T as FromBits<u32>>::Error>
pub fn try_get<T>( self, field: Pack32<T, Version>, ) -> Result<T, <T as FromBits<u32>>::Error>
Unpacks the bit range represented by field
from self
and attempts to convert it into a T
-typed value.
§Returns
Ok(T)
if aT
-typed value could be constructed from the bits insrc
Err(T::Error)
ifsrc
does not contain a valid bit pattern for aT
-typed value, as determined byT
’s [FromBits::try_from_bits
implementation.
Sourcepub fn assert_valid()
pub fn assert_valid()
Asserts that all the packing specs for this type are valid.
This is intended to be used in unit tests.
Sourcepub fn display_ascii(&self) -> impl Display
pub fn display_ascii(&self) -> impl Display
Returns a value that formats this bitfield in a multi-line format, using only ASCII characters.
This is equivalent to formatting this bitfield using a {}
display specifier, but will never use Unicode box-drawing
characters, even when an upstream formatter uses the {:#}
fmt::Display
specifier. This is intended for use on platforms
where Unicode box drawing characters are never available.
Sourcepub fn display_unicode(&self) -> impl Display
pub fn display_unicode(&self) -> impl Display
Returns a value that formats this bitfield in a multi-line format, always using Unicode box-drawing characters.
This is equivalent to formatting this bitfield using a {:#}
format specifier, but will always use Unicode box-drawing
characters, even when an upstream formatter uses the {}
fmt::Display
specifier.
Trait Implementations§
impl Copy for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.