Skip to main content

CpuCacheLevelInfo

Struct CpuCacheLevelInfo 

Source
pub struct CpuCacheLevelInfo {
    pub level: usize,
    pub cache_type: CacheType,
    pub size_kb: usize,
    pub number_of_sets: usize,
    pub ways_of_associativity: usize,
    pub fully_associative: Option<bool>,
    pub share_id_shift: Option<usize>,
}
Expand description

Represents a single cache.

Fields§

§level: usize§cache_type: CacheType§size_kb: usize

The size, in KiB, of the cache available to each processor. In the case of the last-level cache, however, this field might report the aggregate size of all such caches on the package.

§number_of_sets: usize

The number of sets in the cache available to each processor. In the case of the last-level cache, however, this field might report the aggregate number of sets across all such caches in the package. Indeterminate if zero.

§ways_of_associativity: usize

Indeterminate if zero.

§fully_associative: Option<bool>

Indeterminate if None.

§share_id_shift: Option<usize>

The number of bits to shift an APIC ID to get the associated “share ID”: processors with coinciding share IDs share this cache. If None, then it is indeterminate what the cache’s shift is.

Trait Implementations§

Source§

impl Clone for CpuCacheLevelInfo

Source§

fn clone(&self) -> CpuCacheLevelInfo

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 Copy for CpuCacheLevelInfo

Source§

impl Debug for CpuCacheLevelInfo

Source§

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

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

impl Default for CpuCacheLevelInfo

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for CpuCacheLevelInfo

Source§

impl PartialEq for CpuCacheLevelInfo

Source§

fn eq(&self, other: &CpuCacheLevelInfo) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CpuCacheLevelInfo

Auto Trait Implementations§

§

impl Freeze for CpuCacheLevelInfo

§

impl RefUnwindSafe for CpuCacheLevelInfo

§

impl Send for CpuCacheLevelInfo

§

impl Sync for CpuCacheLevelInfo

§

impl Unpin for CpuCacheLevelInfo

§

impl UnsafeUnpin for CpuCacheLevelInfo

§

impl UnwindSafe for CpuCacheLevelInfo

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.