KERN_RETURN

Enum KERN_RETURN 

Source
pub enum KERN_RETURN {
Show 53 variants KERN_SUCCESS = 137_681_831, KERN_INVALID_ADDRESS = 137681832, KERN_PROTECTION_FAILURE = 137681833, KERN_NO_SPACE = 137681834, KERN_INVALID_ARGUMENT = 137681835, KERN_FAILURE = 137681836, KERN_RESOURCE_SHORTAGE = 137681837, KERN_NOT_RECEIVER = 137681838, KERN_NO_ACCESS = 137681839, KERN_MEMORY_FAILURE = 137681840, KERN_MEMORY_ERROR = 137681841, KERN_ALREADY_IN_SET = 137681842, KERN_NOT_IN_SET = 137681843, KERN_NAME_EXISTS = 137681844, KERN_ABORTED = 137681845, KERN_INVALID_NAME = 137681846, KERN_INVALID_TASK = 137681847, KERN_INVALID_RIGHT = 137681848, KERN_INVALID_VALUE = 137681849, KERN_UREFS_OVERFLOW = 137681850, KERN_INVALID_CAPABILITY = 137681851, KERN_RIGHT_EXISTS = 137681852, KERN_INVALID_HOST = 137681853, KERN_MEMORY_PRESENT = 137681854, KERN_MEMORY_DATA_MOVED = 137681855, KERN_MEMORY_RESTART_COPY = 137681856, KERN_INVALID_PROCESSOR_SET = 137681857, KERN_POLICY_LIMIT = 137681858, KERN_INVALID_POLICY = 137681859, KERN_INVALID_OBJECT = 137681860, KERN_ALREADY_WAITING = 137681861, KERN_DEFAULT_SET = 137681862, KERN_EXCEPTION_PROTECTED = 137681863, KERN_INVALID_LEDGER = 137681864, KERN_INVALID_MEMORY_CONTROL = 137681865, KERN_INVALID_SECURITY = 137681866, KERN_NOT_DEPRESSED = 137681867, KERN_TERMINATED = 137681868, KERN_LOCK_SET_DESTROYED = 137681869, KERN_LOCK_UNSTABLE = 137681870, KERN_LOCK_OWNED = 137681871, KERN_LOCK_OWNED_SELF = 137681872, KERN_SEMAPHORE_DESTROYED = 137681873, KERN_RPC_SERVER_TERMINATED = 137681874, KERN_RPC_TERMINATE_ORPHAN = 137681875, KERN_RPC_CONTINUE_ORPHAN = 137681876, KERN_NOT_SUPPORTED = 137681877, KERN_NODE_DOWN = 137681878, KERN_NOT_WAITING = 137681879, KERN_OPERATION_TIMED_OUT = 137681880, KERN_CODESIGN_ERROR = 137681881, KERN_POLICY_STATIC = 137681882, KERN_RETURN_MAX = 137681883,
}
Expand description

the enum for all error code returned from mach kernel. this allows double-ended query: converting from integer to enum, and reverse mapping from enum to integer.

NOTE: the inner enum value (isize) is randomly generated by each compile. it is NOT ACTUAL kernel return code. it must not to be used from down-stream projects. this internal value just used for PartialOrd & Ord for compare between two enum instances.

Variants§

§

KERN_SUCCESS = 137_681_831

§

KERN_INVALID_ADDRESS = 137681832

§

KERN_PROTECTION_FAILURE = 137681833

§

KERN_NO_SPACE = 137681834

§

KERN_INVALID_ARGUMENT = 137681835

§

KERN_FAILURE = 137681836

§

KERN_RESOURCE_SHORTAGE = 137681837

§

KERN_NOT_RECEIVER = 137681838

§

KERN_NO_ACCESS = 137681839

§

KERN_MEMORY_FAILURE = 137681840

§

KERN_MEMORY_ERROR = 137681841

§

KERN_ALREADY_IN_SET = 137681842

§

KERN_NOT_IN_SET = 137681843

§

KERN_NAME_EXISTS = 137681844

§

KERN_ABORTED = 137681845

§

KERN_INVALID_NAME = 137681846

§

KERN_INVALID_TASK = 137681847

§

KERN_INVALID_RIGHT = 137681848

§

KERN_INVALID_VALUE = 137681849

§

KERN_UREFS_OVERFLOW = 137681850

§

KERN_INVALID_CAPABILITY = 137681851

§

KERN_RIGHT_EXISTS = 137681852

§

KERN_INVALID_HOST = 137681853

§

KERN_MEMORY_PRESENT = 137681854

§

KERN_MEMORY_DATA_MOVED = 137681855

§

KERN_MEMORY_RESTART_COPY = 137681856

§

KERN_INVALID_PROCESSOR_SET = 137681857

§

KERN_POLICY_LIMIT = 137681858

§

KERN_INVALID_POLICY = 137681859

§

KERN_INVALID_OBJECT = 137681860

§

KERN_ALREADY_WAITING = 137681861

§

KERN_DEFAULT_SET = 137681862

§

KERN_EXCEPTION_PROTECTED = 137681863

§

KERN_INVALID_LEDGER = 137681864

§

KERN_INVALID_MEMORY_CONTROL = 137681865

§

KERN_INVALID_SECURITY = 137681866

§

KERN_NOT_DEPRESSED = 137681867

§

KERN_TERMINATED = 137681868

§

KERN_LOCK_SET_DESTROYED = 137681869

§

KERN_LOCK_UNSTABLE = 137681870

§

KERN_LOCK_OWNED = 137681871

§

KERN_LOCK_OWNED_SELF = 137681872

§

KERN_SEMAPHORE_DESTROYED = 137681873

§

KERN_RPC_SERVER_TERMINATED = 137681874

§

KERN_RPC_TERMINATE_ORPHAN = 137681875

§

KERN_RPC_CONTINUE_ORPHAN = 137681876

§

KERN_NOT_SUPPORTED = 137681877

§

KERN_NODE_DOWN = 137681878

§

KERN_NOT_WAITING = 137681879

§

KERN_OPERATION_TIMED_OUT = 137681880

§

KERN_CODESIGN_ERROR = 137681881

§

KERN_POLICY_STATIC = 137681882

§

KERN_RETURN_MAX = 137681883

Implementations§

Source§

impl KERN_RETURN

Source

pub const fn stringify(&self) -> &'static str

Source

pub const fn is_ok(&self) -> bool

Source

pub const fn is_err(&self) -> bool

Source

pub const fn is_success(&self) -> bool

Source

pub const fn is_failed(&self) -> bool

Source

pub const fn to_int(&self) -> kern_return_t

Source

pub const fn from_int(val: kern_return_t) -> Self

Source

pub const fn try_from_int(val: kern_return_t) -> Result<Self, kern_return_t>

Trait Implementations§

Source§

impl Clone for KERN_RETURN

Source§

fn clone(&self) -> KERN_RETURN

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 KERN_RETURN

Source§

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

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

impl Display for KERN_RETURN

Source§

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

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

impl From<KERN_RETURN> for i128

Source§

fn from(val: KERN_RETURN) -> i128

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for i16

Source§

fn from(val: KERN_RETURN) -> i16

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for i32

Source§

fn from(val: KERN_RETURN) -> i32

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for i64

Source§

fn from(val: KERN_RETURN) -> i64

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for i8

Source§

fn from(val: KERN_RETURN) -> i8

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for isize

Source§

fn from(val: KERN_RETURN) -> isize

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for u128

Source§

fn from(val: KERN_RETURN) -> u128

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for u16

Source§

fn from(val: KERN_RETURN) -> u16

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for u32

Source§

fn from(val: KERN_RETURN) -> u32

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for u64

Source§

fn from(val: KERN_RETURN) -> u64

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for u8

Source§

fn from(val: KERN_RETURN) -> u8

Converts to this type from the input type.
Source§

impl From<KERN_RETURN> for usize

Source§

fn from(val: KERN_RETURN) -> usize

Converts to this type from the input type.
Source§

impl Hash for KERN_RETURN

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for KERN_RETURN

Source§

fn cmp(&self, other: &KERN_RETURN) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<KERN_RETURN> for i128

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for i16

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for i32

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for i64

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for i8

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for isize

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for u128

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for u16

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for u32

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for u64

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for u8

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<KERN_RETURN> for usize

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialEq<i128> for KERN_RETURN

Source§

fn eq(&self, other: &i128) -> 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 PartialEq<i16> for KERN_RETURN

Source§

fn eq(&self, other: &i16) -> 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 PartialEq<i32> for KERN_RETURN

Source§

fn eq(&self, other: &i32) -> 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 PartialEq<i64> for KERN_RETURN

Source§

fn eq(&self, other: &i64) -> 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 PartialEq<i8> for KERN_RETURN

Source§

fn eq(&self, other: &i8) -> 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 PartialEq<isize> for KERN_RETURN

Source§

fn eq(&self, other: &isize) -> 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 PartialEq<u128> for KERN_RETURN

Source§

fn eq(&self, other: &u128) -> 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 PartialEq<u16> for KERN_RETURN

Source§

fn eq(&self, other: &u16) -> 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 PartialEq<u32> for KERN_RETURN

Source§

fn eq(&self, other: &u32) -> 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 PartialEq<u64> for KERN_RETURN

Source§

fn eq(&self, other: &u64) -> 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 PartialEq<u8> for KERN_RETURN

Source§

fn eq(&self, other: &u8) -> 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 PartialEq<usize> for KERN_RETURN

Source§

fn eq(&self, other: &usize) -> 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 PartialEq for KERN_RETURN

Source§

fn eq(&self, other: &KERN_RETURN) -> 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 PartialOrd for KERN_RETURN

Source§

fn partial_cmp(&self, other: &KERN_RETURN) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<i128> for KERN_RETURN

Source§

type Error = i128

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

fn try_from(val: i128) -> Result<KERN_RETURN, i128>

Performs the conversion.
Source§

impl TryFrom<i16> for KERN_RETURN

Source§

type Error = i16

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

fn try_from(val: i16) -> Result<KERN_RETURN, i16>

Performs the conversion.
Source§

impl TryFrom<i32> for KERN_RETURN

Source§

type Error = i32

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

fn try_from(val: i32) -> Result<KERN_RETURN, i32>

Performs the conversion.
Source§

impl TryFrom<i64> for KERN_RETURN

Source§

type Error = i64

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

fn try_from(val: i64) -> Result<KERN_RETURN, i64>

Performs the conversion.
Source§

impl TryFrom<i8> for KERN_RETURN

Source§

type Error = i8

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

fn try_from(val: i8) -> Result<KERN_RETURN, i8>

Performs the conversion.
Source§

impl TryFrom<isize> for KERN_RETURN

Source§

type Error = isize

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

fn try_from(val: isize) -> Result<KERN_RETURN, isize>

Performs the conversion.
Source§

impl TryFrom<u128> for KERN_RETURN

Source§

type Error = u128

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

fn try_from(val: u128) -> Result<KERN_RETURN, u128>

Performs the conversion.
Source§

impl TryFrom<u16> for KERN_RETURN

Source§

type Error = u16

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

fn try_from(val: u16) -> Result<KERN_RETURN, u16>

Performs the conversion.
Source§

impl TryFrom<u32> for KERN_RETURN

Source§

type Error = u32

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

fn try_from(val: u32) -> Result<KERN_RETURN, u32>

Performs the conversion.
Source§

impl TryFrom<u64> for KERN_RETURN

Source§

type Error = u64

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

fn try_from(val: u64) -> Result<KERN_RETURN, u64>

Performs the conversion.
Source§

impl TryFrom<u8> for KERN_RETURN

Source§

type Error = u8

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

fn try_from(val: u8) -> Result<KERN_RETURN, u8>

Performs the conversion.
Source§

impl TryFrom<usize> for KERN_RETURN

Source§

type Error = usize

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

fn try_from(val: usize) -> Result<KERN_RETURN, usize>

Performs the conversion.
Source§

impl Copy for KERN_RETURN

Source§

impl Eq for KERN_RETURN

Source§

impl StructuralPartialEq for KERN_RETURN

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.