Skip to main content

ErrorCode

Struct ErrorCode 

Source
pub struct ErrorCode(/* private fields */);
Expand description

ErrorCode

Stable numeric public error identity.

The public Candid icydb::Error stores this value as nat16 so canister interfaces do not retain rich diagnostic enum labels. Rich diagnostics can still be reconstructed by host-side tooling from this leaf code. Before 1.0.0, the code space is hard-cut to a single compact sequential range.

Implementations§

Source§

impl ErrorCode

Source

pub const QUERY_VALIDATE: Self

Source

pub const QUERY_INTENT: Self

Source

pub const QUERY_PLAN: Self

Source

pub const QUERY_ACCESS_REQUIREMENT: Self

Source

pub const QUERY_UNORDERED_PAGINATION: Self

Source

pub const QUERY_INVALID_CONTINUATION_CURSOR: Self

Source

pub const QUERY_NOT_FOUND: Self

Source

pub const QUERY_NOT_UNIQUE: Self

Source

pub const QUERY_NUMERIC_OVERFLOW: Self

Source

pub const QUERY_NUMERIC_NOT_REPRESENTABLE: Self

Source

pub const QUERY_UNKNOWN_AGGREGATE_TARGET_FIELD: Self

Source

pub const QUERY_UNSUPPORTED_SQL_FEATURE: Self

Source

pub const QUERY_SQL_SURFACE_MISMATCH: Self

Source

pub const SCHEMA_DDL_ADMISSION: Self

Source

pub const STORE_NOT_FOUND: Self

Source

pub const STORE_CORRUPTION: Self

Source

pub const STORE_INVARIANT_VIOLATION: Self

Source

pub const RUNTIME_CORRUPTION: Self

Source

pub const RUNTIME_INCOMPATIBLE_PERSISTED_FORMAT: Self

Source

pub const RUNTIME_INVARIANT_VIOLATION: Self

Source

pub const RUNTIME_CONFLICT: Self

Source

pub const RUNTIME_NOT_FOUND: Self

Source

pub const RUNTIME_UNSUPPORTED: Self

Source

pub const RUNTIME_INTERNAL: Self

Source

pub const RUNTIME_BOUNDARY_SQL_SURFACE_CONTROLLER_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_SCHEMA_SURFACE_CONTROLLER_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_SQL_QUERY_NO_CONFIGURED_ENTITIES: Self

Source

pub const RUNTIME_BOUNDARY_SQL_QUERY_ENTITY_NOT_CONFIGURED: Self

Source

pub const RUNTIME_BOUNDARY_SQL_DDL_TARGET_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_SQL_DDL_ENTITY_NOT_CONFIGURED: Self

Source

pub const RUNTIME_BOUNDARY_QUERY_RESPONSE_ROWS_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_QUERY_RESPONSE_GROUPED_ROWS_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_MUTATION_RESULT_ENTITY_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_MUTATION_RESULT_ENTITIES_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_MUTATION_RESULT_ID_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_MUTATION_RESULT_IDS_REQUIRED: Self

Source

pub const RUNTIME_BOUNDARY_ROW_PROJECTION_FIELD_NOT_CONFIGURED: Self

Source

pub const SQL_FEATURE_AGGREGATE_FILTER_CLAUSE: Self

Source

pub const SQL_FEATURE_ALTER_STATEMENT_BEYOND_ALTER_TABLE: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ADD_COLUMN_DUPLICATE_DEFAULT: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ADD_COLUMN_MODIFIERS: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ADD_STATEMENT_BEYOND_ADD_COLUMN: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ALTER_COLUMN_DROP_UNSUPPORTED_ACTION: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ALTER_COLUMN_MODIFIERS: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ALTER_COLUMN_SET_UNSUPPORTED_ACTION: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ALTER_COLUMN_UNSUPPORTED_ACTION: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_ALTER_STATEMENT_BEYOND_ALTER_COLUMN: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_DROP_COLUMN_IF_EXISTS_SYNTAX: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_DROP_COLUMN_MODIFIERS: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_DROP_STATEMENT_BEYOND_DROP_COLUMN: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_RENAME_COLUMN_MISSING_TO: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_RENAME_COLUMN_MODIFIERS: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_RENAME_STATEMENT_BEYOND_RENAME_COLUMN: Self

Source

pub const SQL_FEATURE_ALTER_TABLE_UNSUPPORTED_OPERATION: Self

Source

pub const SQL_FEATURE_COLUMN_ALIAS: Self

Source

pub const SQL_FEATURE_CREATE_INDEX_IF_NOT_EXISTS_SYNTAX: Self

Source

pub const SQL_FEATURE_CREATE_INDEX_KEY_ORDERING_MODIFIERS: Self

Source

pub const SQL_FEATURE_CREATE_INDEX_MODIFIERS: Self

Source

pub const SQL_FEATURE_CREATE_STATEMENT_BEYOND_CREATE_INDEX: Self

Source

pub const SQL_FEATURE_DESCRIBE_MODIFIER: Self

Source

pub const SQL_FEATURE_DDL_SCHEMA_VERSION_DUPLICATE_EXPECTED_CLAUSE: Self

Source

pub const SQL_FEATURE_DDL_SCHEMA_VERSION_DUPLICATE_SET_CLAUSE: Self

Source

pub const SQL_FEATURE_DROP_INDEX_MODIFIERS: Self

Source

pub const SQL_FEATURE_DROP_INDEX_IF_EXISTS_SYNTAX: Self

Source

pub const SQL_FEATURE_DROP_STATEMENT_BEYOND_DROP_INDEX: Self

Source

pub const SQL_FEATURE_EXPRESSION_INDEX_UNSUPPORTED_FUNCTION: Self

Source

pub const SQL_FEATURE_HAVING: Self

Source

pub const SQL_FEATURE_INSERT: Self

Source

pub const SQL_FEATURE_JOIN: Self

Source

pub const SQL_FEATURE_LIKE_PATTERN_BEYOND_TRAILING_PREFIX: Self

Source

pub const SQL_FEATURE_LOWER_FIELD_PREDICATE_UNSUPPORTED: Self

Source

pub const SQL_FEATURE_MULTI_STATEMENT_SQL: Self

Source

pub const SQL_FEATURE_NESTED_AGGREGATE_INPUT: Self

Source

pub const SQL_FEATURE_NESTED_PROJECTION_FUNCTION_IN_ARITHMETIC: Self

Source

pub const SQL_FEATURE_ORDER_BY_UNSUPPORTED_FORM: Self

Source

pub const SQL_FEATURE_OTHER: Self

Source

pub const SQL_FEATURE_PARAMETER_BINDING: Self

Source

pub const SQL_FEATURE_PARAMETERIZED_SCHEMA_VERSION: Self

Source

pub const SQL_FEATURE_PREDICATE_STARTS_WITH_FIRST_ARGUMENT: Self

Source

pub const SQL_FEATURE_QUOTED_IDENTIFIERS: Self

Source

pub const SQL_FEATURE_RETURNING_UNSUPPORTED_SHAPE: Self

Source

pub const SQL_FEATURE_SCALAR_FUNCTION_EXPRESSION_POSITION: Self

Source

pub const SQL_FEATURE_SCALE_TAKING_NUMERIC_FUNCTION_EXPRESSION_POSITION: Self

Source

pub const SQL_FEATURE_SEARCHED_CASE_GROUPED_ORDER_BY: Self

Source

pub const SQL_FEATURE_SHOW_COLUMNS_MODIFIERS: Self

Source

pub const SQL_FEATURE_SHOW_ENTITIES_MODIFIERS: Self

Source

pub const SQL_FEATURE_SHOW_INDEXES_MODIFIERS: Self

Source

pub const SQL_FEATURE_SHOW_MEMORY_MODIFIERS: Self

Source

pub const SQL_FEATURE_SHOW_STORES_MODIFIERS: Self

Source

pub const SQL_FEATURE_SHOW_UNSUPPORTED_COMMAND: Self

Source

pub const SQL_FEATURE_SIMPLE_CASE_EXPRESSION: Self

Source

pub const SQL_FEATURE_STANDALONE_LITERAL_PROJECTION_ITEM: Self

Source

pub const SQL_FEATURE_SUPPORTED_GROUPED_ORDER_BY_EXPRESSION_FAMILY: Self

Source

pub const SQL_FEATURE_SUPPORTED_ORDER_BY_EXPRESSION_FAMILY: Self

Source

pub const SQL_FEATURE_UNION_INTERSECT_EXCEPT: Self

Source

pub const SQL_FEATURE_UNSUPPORTED_FUNCTION_NAMESPACE: Self

Source

pub const SQL_FEATURE_UPDATE: Self

Source

pub const SQL_FEATURE_UPPER_FIELD_PREDICATE_UNSUPPORTED: Self

Source

pub const SQL_FEATURE_WINDOW_FUNCTION: Self

Source

pub const SQL_FEATURE_WITH: Self

Source

pub const SQL_FEATURE_NUMERIC_SCALE_FUNCTION_ARGUMENTS: Self

Source

pub const SQL_FEATURE_ORDER_BY_FIELD_NOT_ORDERABLE: Self

Source

pub const SQL_SURFACE_QUERY_REJECTS_INSERT: Self

Source

pub const SQL_SURFACE_QUERY_REJECTS_UPDATE: Self

Source

pub const SQL_SURFACE_QUERY_REJECTS_DELETE: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_SELECT: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_EXPLAIN: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_DESCRIBE: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_SHOW_INDEXES: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_SHOW_COLUMNS: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_SHOW_ENTITIES: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_SHOW_STORES: Self

Source

pub const SQL_SURFACE_UPDATE_REJECTS_SHOW_MEMORY: Self

Source

pub const SCHEMA_DDL_MISSING_EXPECTED_SCHEMA_VERSION: Self

Source

pub const SCHEMA_DDL_MISSING_NEXT_SCHEMA_VERSION: Self

Source

pub const SCHEMA_DDL_STALE_EXPECTED_SCHEMA_VERSION: Self

Source

pub const SCHEMA_DDL_INVALID_EXPECTED_SCHEMA_VERSION: Self

Source

pub const SCHEMA_DDL_INVALID_NEXT_SCHEMA_VERSION: Self

Source

pub const SCHEMA_DDL_ACCEPTED_SCHEMA_CHANGE_WITHOUT_VERSION_BUMP: Self

Source

pub const SCHEMA_DDL_EMPTY_VERSION_BUMP: Self

Source

pub const SCHEMA_DDL_VERSION_GAP: Self

Source

pub const SCHEMA_DDL_VERSION_ROLLBACK: Self

Source

pub const SCHEMA_DDL_FINGERPRINT_METHOD_MISMATCH: Self

Source

pub const SCHEMA_DDL_UNSUPPORTED_TRANSITION_CLASS: Self

Source

pub const SCHEMA_DDL_PHYSICAL_RUNNER_MISSING: Self

Source

pub const SCHEMA_DDL_VALIDATION_FAILED: Self

Source

pub const SCHEMA_DDL_PUBLICATION_RACE_LOST: Self

Source

pub const SCHEMA_DDL_INVALID_ADD_COLUMN_DEFAULT: Self

Source

pub const SCHEMA_DDL_INVALID_ALTER_COLUMN_DEFAULT: Self

Source

pub const SCHEMA_DDL_GENERATED_INDEX_DROP_REJECTED: Self

Source

pub const SCHEMA_DDL_REQUIRED_DROP_DEFAULT_UNSUPPORTED: Self

Source

pub const SCHEMA_DDL_GENERATED_FIELD_DEFAULT_CHANGE_REJECTED: Self

Source

pub const SCHEMA_DDL_GENERATED_FIELD_NULLABILITY_CHANGE_REJECTED: Self

Source

pub const SCHEMA_DDL_SET_NOT_NULL_VALIDATION_FAILED: Self

Source

pub const QUERY_SQL_WRITE_BOUNDARY: Self

Source

pub const SQL_WRITE_PRIMARY_KEY_LITERAL_SHAPE: Self

Source

pub const SQL_WRITE_PRIMARY_KEY_LITERAL_INCOMPATIBLE: Self

Source

pub const SQL_WRITE_MISSING_PRIMARY_KEY: Self

Source

pub const SQL_WRITE_MISSING_REQUIRED_FIELDS: Self

Source

pub const SQL_WRITE_EXPLICIT_MANAGED_FIELD: Self

Source

pub const SQL_WRITE_EXPLICIT_GENERATED_FIELD: Self

Source

pub const SQL_WRITE_INSERT_SELECT_REQUIRES_SCALAR: Self

Source

pub const SQL_WRITE_INSERT_SELECT_AGGREGATE_PROJECTION: Self

Source

pub const SQL_WRITE_INSERT_SELECT_WIDTH_MISMATCH: Self

Source

pub const SQL_WRITE_UPDATE_PRIMARY_KEY_MUTATION: Self

Source

pub const SQL_WRITE_INVALID_FIELD_LITERAL: Self

Source

pub const SQL_WRITE_UNKNOWN_RETURNING_FIELD: Self

Source

pub const SQL_WRITE_DUPLICATE_RETURNING_FIELD: Self

Source

pub const SQL_WRITE_UPDATE_MISSING_WHERE_PREDICATE: Self

Source

pub const SQL_WRITE_ORDER_BY_UNSUPPORTED_SHAPE: Self

Source

pub const QUERY_UNSUPPORTED_PROJECTION: Self

Source

pub const QUERY_PROJECTION_NUMERIC_LITERAL_REQUIRED: Self

Source

pub const QUERY_PROJECTION_NUMERIC_SCALE_ARGUMENTS: Self

Source

pub const QUERY_PROJECTION_NESTED_FIELD_PATH_PREVIEW: Self

Source

pub const QUERY_PROJECTION_CASE_CONDITION_BOOLEAN_REQUIRED: Self

Source

pub const QUERY_PROJECTION_NUMERIC_INPUT_REQUIRED: Self

Source

pub const QUERY_PROJECTION_TEXT_OR_BLOB_INPUT_REQUIRED: Self

Source

pub const QUERY_PROJECTION_TEXT_INPUT_REQUIRED: Self

Source

pub const QUERY_PROJECTION_TEXT_OR_NULL_ARGUMENT_REQUIRED: Self

Source

pub const QUERY_PROJECTION_INTEGER_OR_NULL_ARGUMENT_REQUIRED: Self

Source

pub const QUERY_PROJECTION_UNARY_OPERAND_INCOMPATIBLE: Self

Source

pub const QUERY_PROJECTION_BINARY_OPERANDS_INCOMPATIBLE: Self

Source

pub const QUERY_RESULT_SHAPE_MISMATCH: Self

Source

pub const QUERY_RESULT_EXPECTED_ROWS: Self

Source

pub const QUERY_RESULT_EXPECTED_GROUPED: Self

Source

pub const fn from_raw(raw: u16) -> Self

Build an error code from its raw public wire value.

Source

pub const fn raw(self) -> u16

Return the raw public wire value.

Source

pub const fn from_parts( code: DiagnosticCode, detail: Option<DiagnosticDetail>, ) -> Self

Collapse a rich diagnostic into one public leaf code.

Source

pub const fn diagnostic_code(self) -> DiagnosticCode

Return the broad diagnostic reason represented by this public code.

Source

pub const fn class(self) -> ErrorClass

Return the diagnostic class represented by this public code.

Source

pub const fn diagnostic_detail(self) -> Option<DiagnosticDetail>

Reconstruct rich diagnostic detail for host-side rendering, when known.

Source

pub const fn diagnostic(self, origin: ErrorOrigin) -> Diagnostic

Reconstruct a rich diagnostic payload for host-side rendering.

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> ErrorCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorCode

Source§

impl Debug for ErrorCode

Source§

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

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

impl Eq for ErrorCode

Source§

impl Hash for ErrorCode

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 PartialEq for ErrorCode

Source§

fn eq(&self, other: &ErrorCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for ErrorCode

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.