Enum r3::kernel::ResultCode[][src]

#[repr(i8)]
pub enum ResultCode {
    Success,
    NotSupported,
    BadParam,
    BadId,
    BadContext,
    NotOwner,
    WouldDeadlock,
    BadObjectState,
    QueueOverflow,
    Abandoned,
    Interrupted,
    Timeout,
}
Expand description

All result codes (including success) that the C API can return.

Relation to Other Specifications: All error codes are intentionally matched to their equivalents in μITRON4.0 for no particular reasons.

Rationale: Using the C API result codes internally reduces the interop overhead at an API surface.

Variants

Success

The operation was successful. No additional information is available.

NotSupported

The operation is not supported.

BadParam

A parameter is invalid in a way that is no covered by any other error codes.

BadId

A specified object identifier (Id) is invalid.

BadContext

The current context disallows the operation.

NotOwner

The caller does not own the resource.

WouldDeadlock

Resource deadlock would occur.

BadObjectState

A target object is in a state that disallows the operation.

QueueOverflow

An operation or an object couldn’t be enqueued because there are too many of such things that already have been enqueued.

Abandoned

The owner of a mutex exited while holding the mutex lock.

Interrupted

The wait operation was interrupted by Task::interrupt.

Timeout

The operation timed out.

Implementations

Get the short name of the result code.

Examples
use r3::kernel::ResultCode;
assert_eq!(ResultCode::BadObjectState.as_str(), "BadObjectState");

Get a flag indicating whether the code represents a failure.

Failure codes have negative values.

Get a flag indicating whether the code represents a success.

Success codes have non-negative values.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.