Enum ark_api_ffi::ErrorCode
source · [−]#[non_exhaustive]
#[repr(u32)]
pub enum ErrorCode {
Success,
ApiNotAvailable,
InternalError,
InvalidArguments,
NotFound,
Unavailable,
}Expand description
Error return codes for API functions.
Note that there is an ErrorCode::Success,
so the presence of ErrorCode does NOT signify an error.
Do NOT use this type in the public interface of ark-api. Use idiomatic Rust error enum or ark_api::Error instead
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Success
Success - there was no error and the operation completed successfully
ApiNotAvailable
API not available.
Typically happens if a module calls an API it has not specified that it requires
InternalError
Internal error - something went wrong on in the Ark host
InvalidArguments
Invalid arguments - the inputs to the called API function were not valid
NotFound
Resource not found - used by APIs to indicate a requested resource can’t be found
Unavailable
The API or resource is currently not available
Trait Implementations
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralEq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more