Skip to main content

PerCpuError

Enum PerCpuError 

Source
pub enum PerCpuError {
Show 20 variants AreaTooSmall { actual: usize, minimum: usize, }, StrideTooSmall { stride: usize, area_size: usize, }, MisalignedRuntimeBase { base: usize, alignment: usize, }, MisalignedStride { stride: usize, alignment: usize, }, MisalignedTemplateBase { base: usize, alignment: usize, }, MalformedAlignmentMetadata { start: usize, end: usize, }, InvalidSymbolAlignment(usize), AlignmentMetadataMismatch { descriptors: usize, linker: usize, }, AddressOverflow, MalformedInitTable { start: usize, end: usize, }, MalformedInitRecord { index: usize, offset: usize, size: usize, alignment: usize, }, OverlappingInitRecords { first_offset: usize, second_offset: usize, }, LayoutInitializationInProgress, LayoutAlreadyInitialized, InitializerTableUnavailable, PrefixPlacement { template_base: usize, prefix_address: usize, }, LayoutNotInstalled, CpuOutOfRange { cpu_index: CpuIndex, area_count: u32, }, CurrentAreaMismatch { expected: CpuAreaRef, actual: CpuAreaRef, }, CpuLocal(CpuLocalError),
}
Expand description

Failure to initialize, locate, or access a runtime per-CPU area.

Variants§

§

AreaTooSmall

One area cannot hold the fixed CPU-local prefix.

Fields

§actual: usize

Actual linked template size.

§minimum: usize

Minimum supported prefix size.

§

StrideTooSmall

Adjacent runtime areas overlap.

Fields

§stride: usize

Supplied stride.

§area_size: usize

Linked template size.

§

MisalignedRuntimeBase

Runtime base is not aligned for all generated symbols.

Fields

§base: usize

Supplied runtime base.

§alignment: usize

Required alignment.

§

MisalignedStride

Area stride does not preserve required alignment.

Fields

§stride: usize

Supplied stride.

§alignment: usize

Required alignment.

§

MisalignedTemplateBase

The linked template base does not preserve every symbol’s alignment.

Fields

§base: usize

Loaded template base.

§alignment: usize

Required alignment.

§

MalformedAlignmentMetadata

Linker-provided alignment boundaries are inconsistent.

Fields

§start: usize

First descriptor address.

§end: usize

One-past-the-end descriptor address.

§

InvalidSymbolAlignment(usize)

A generated alignment is not a nonzero power of two.

§

AlignmentMetadataMismatch

The linker layout and generated descriptor table disagree.

Fields

§descriptors: usize

Maximum generated alignment.

§linker: usize

Alignment encoded by the linker.

§

AddressOverflow

Address calculation overflowed.

§

MalformedInitTable

Initializer table boundaries are inconsistent.

Fields

§start: usize

First registration address.

§end: usize

One-past-the-end registration address.

§

MalformedInitRecord

One typed initializer does not fit the template layout.

Fields

§index: usize

Registration index in the final image.

§offset: usize

Destination offset.

§size: usize

Storage size.

§alignment: usize

Storage alignment.

§

OverlappingInitRecords

Two typed initializer destinations overlap.

Fields

§first_offset: usize

First overlapping offset.

§second_offset: usize

Second overlapping offset.

§

LayoutInitializationInProgress

Another initialization attempt is active.

§

LayoutAlreadyInitialized

The one-shot layout has already been installed.

§

InitializerTableUnavailable

The target does not provide an ELF initializer table.

§

PrefixPlacement

The CPU-local prefix is not first in the template.

Fields

§template_base: usize

Loaded template start.

§prefix_address: usize

Fixed prefix symbol address.

§

LayoutNotInstalled

No runtime layout has been installed.

§

CpuOutOfRange

Requested logical CPU is outside the installed region.

Fields

§cpu_index: CpuIndex

Requested CPU.

§area_count: u32

Installed area count.

§

CurrentAreaMismatch

A supplied current CPU area differs from the installed area.

Fields

§expected: CpuAreaRef

Area selected by the installed layout.

§actual: CpuAreaRef

Area carried by the pin.

§

CpuLocal(CpuLocalError)

CPU-local prefix construction or validation failed.

Trait Implementations§

Source§

impl Clone for PerCpuError

Source§

fn clone(&self) -> PerCpuError

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

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PerCpuError

Source§

impl Debug for PerCpuError

Source§

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

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

impl Display for PerCpuError

Source§

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

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

impl Eq for PerCpuError

Source§

impl Error for PerCpuError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CpuLocalError> for PerCpuError

Source§

fn from(source: CpuLocalError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for PerCpuError

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PerCpuError

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

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

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

Performs the conversion.