Struct ffi_support::ErrorCode [−][src]
#[repr(transparent)]pub struct ErrorCode(_);
Expand description
A wrapper around error codes, which is represented identically to an i32 on the other side of the FFI. Essentially exists to check that we don’t accidentally reuse success/panic codes for other things.
Implementations
The ErrorCode used for panics. It’s unlikely you need to ever use this.
The ErrorCode used for handle map errors.
Construct an error code from an integer code.
Panics
Panics if you call it with 0 (reserved for success, but you can use ErrorCode::SUCCESS
if
that’s what you want), or -1 (reserved for panics, but you can use ErrorCode::PANIC
if
that’s what you want).
Returns whether or not this is a success code.
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
Mutably borrows from an owned value. Read more