Enum ErrorStatus

Source
#[repr(u16)]
pub enum ErrorStatus {
Show 30 variants Generic = 1, OperationNotSupported = 2, NotSupported = 3, Corrupted = 4, InvalidSyscall = 5, InvalidResource = 6, InvalidPid = 7, InvalidOffset = 8, InvalidPtr = 9, InvalidStr = 10, StrTooLong = 11, InvalidPath = 12, NoSuchAFileOrDirectory = 13, NotAFile = 14, NotADirectory = 15, AlreadyExists = 16, NotExecutable = 17, DirectoryNotEmpty = 18, MissingPermissions = 19, MMapError = 20, Busy = 21, NotEnoughArguments = 22, OutOfMemory = 23, InvalidTid = 24, Timeout = 25, InvalidCommand = 26, InvalidArgument = 27, Unknown = 28, Panic = 29, NotADevice = 30,
}

Variants§

§

Generic = 1

Use when no ErrorStatus is available for xyz and you cannot add a new one

§

OperationNotSupported = 2

§

NotSupported = 3

For example an elf class is not supported, there is a difference between NotSupported and OperationNotSupported

§

Corrupted = 4

For example a magic value is invalid

§

InvalidSyscall = 5

§

InvalidResource = 6

§

InvalidPid = 7

§

InvalidOffset = 8

§

InvalidPtr = 9

instead of panicking syscalls will return this on null and unaligned pointers some operations may accept null pointers

§

InvalidStr = 10

for operations that requires a valid utf8 str…

§

StrTooLong = 11

for operations that requires a str that doesn’t exceed a max length such as file names (128 bytes)

§

InvalidPath = 12

§

NoSuchAFileOrDirectory = 13

§

NotAFile = 14

§

NotADirectory = 15

§

AlreadyExists = 16

§

NotExecutable = 17

§

DirectoryNotEmpty = 18

§

MissingPermissions = 19

Generic permissions(protection) related error

§

MMapError = 20

Memory Mapping error for now this means that the region has been already mapped before

§

Busy = 21

§

NotEnoughArguments = 22

§

OutOfMemory = 23

§

InvalidTid = 24

Invalid Thread ID

§

Timeout = 25

Operation Timeouted

§

InvalidCommand = 26

A given Command is unknown or invalid

§

InvalidArgument = 27

A given Argument is invalid

§

Unknown = 28

§

Panic = 29

A panick or a fatal exception occurred, used for example when the rust runtime panics and it wants to exit the process with a value

§

NotADevice = 30

A given resource wasn’t a Device while one was expected

Implementations§

Source§

impl ErrorStatus

Source

pub fn as_str(&self) -> &'static str

Gives a string description of the error

Trait Implementations§

Source§

impl Clone for ErrorStatus

Source§

fn clone(&self) -> ErrorStatus

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 ErrorStatus

Source§

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

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

impl From<ErrorStatus> for SysResult

Source§

fn from(value: ErrorStatus) -> SysResult

Converts to this type from the input type.
Source§

impl<T> From<T> for ErrorStatus
where T: IntoErr,

Source§

fn from(value: T) -> ErrorStatus

Converts to this type from the input type.
Source§

impl PartialEq for ErrorStatus

Source§

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

Source§

type Error = ()

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

fn try_from( value: u16, ) -> Result<ErrorStatus, <ErrorStatus as TryFrom<u16>>::Error>

Performs the conversion.
Source§

impl Copy for ErrorStatus

Source§

impl Eq for ErrorStatus

Source§

impl StructuralPartialEq for ErrorStatus

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, 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.