Skip to main content

FrameworkErrorKind

Enum FrameworkErrorKind 

Source
pub enum FrameworkErrorKind {
Show 17 variants None, InvalidArgument, OutOfMemory, Io, BufferTooSmall, CurrentSystemUnknown, DatabasePathInvalid, DatabaseNotFound, DatabaseArchitectureUnsupported, DatabaseVersionUnsupported, DatabaseCorrupt, EventNotFound, ConflictingEvents, AllCountersMustBeForced, EventUnavailable, CheckErrno, Other(c_int),
}
Available on macOS only.
Expand description

Categorizes a kpep_config_error_code into a semantic variant.

The variants mirror the KPEP_CONFIG_ERROR_* constants from kperfdata.framework. Other captures any unrecognized code returned by a future OS revision.

Variants§

§

None

The operation completed successfully (KPEP_CONFIG_ERROR_NONE, code 0).

§

InvalidArgument

A required argument was null or otherwise invalid.

§

OutOfMemory

Memory allocation failed inside the framework.

§

Io

An I/O error occurred while reading the PMC database plist.

§

BufferTooSmall

A caller-supplied buffer was too small to receive the result.

§

CurrentSystemUnknown

The current CPU could not be identified in the PMC database.

§

DatabasePathInvalid

The path to the PMC database plist is invalid.

§

DatabaseNotFound

No PMC database plist was found for the requested CPU.

§

DatabaseArchitectureUnsupported

The PMC database exists but targets an unsupported architecture.

§

DatabaseVersionUnsupported

The PMC database version is not supported by this framework build.

§

DatabaseCorrupt

The PMC database plist is malformed or corrupt.

§

EventNotFound

The requested event name was not found in the PMC database.

§

ConflictingEvents

Two or more events conflict and cannot be measured simultaneously.

§

AllCountersMustBeForced

Counters must be force-acquired via kpc_force_all_ctrs_set(1) before configuring.

§

EventUnavailable

The requested event exists in the database but is unavailable on this hardware.

§

CheckErrno

A POSIX error occurred; check errno for details.

§

Other(c_int)

An error code not covered by any known variant.

Trait Implementations§

Source§

impl Clone for FrameworkErrorKind

Source§

fn clone(&self) -> FrameworkErrorKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameworkErrorKind

Source§

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

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

impl Display for FrameworkErrorKind

Source§

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

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

impl PartialEq for FrameworkErrorKind

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for FrameworkErrorKind

Source§

impl Eq for FrameworkErrorKind

Source§

impl StructuralPartialEq for FrameworkErrorKind

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.