#[non_exhaustive]pub enum ErrorCode {
gts_hx_core_errors_err_v1_hx_odata_errors_invalid_filter_v1,
gts_hx_core_errors_err_v1_hx_odata_errors_invalid_orderby_v1,
gts_hx_core_errors_err_v1_hx_odata_errors_invalid_cursor_v1,
gts_hx_core_errors_err_v1_hx_odata_errors_internal_v1,
}Expand description
Strongly-typed error codes generated from the JSON catalog
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.
gts_hx_core_errors_err_v1_hx_odata_errors_invalid_filter_v1
gts.hx.core.errors.err.v1~hx.odata.errors.invalid_filter.v1
gts_hx_core_errors_err_v1_hx_odata_errors_invalid_orderby_v1
gts.hx.core.errors.err.v1~hx.odata.errors.invalid_orderby.v1
gts_hx_core_errors_err_v1_hx_odata_errors_invalid_cursor_v1
gts.hx.core.errors.err.v1~hx.odata.errors.invalid_cursor.v1
gts_hx_core_errors_err_v1_hx_odata_errors_internal_v1
gts.hx.core.errors.err.v1~hx.odata.errors.internal.v1
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn as_problem(&self, detail: impl Into<String>) -> Problem
pub fn as_problem(&self, detail: impl Into<String>) -> Problem
Convert to Problem with detail (without instance/trace)
Sourcepub fn with_context(
&self,
detail: impl Into<String>,
instance: &str,
trace_id: Option<String>,
) -> Problem
pub fn with_context( &self, detail: impl Into<String>, instance: &str, trace_id: Option<String>, ) -> Problem
Create a Problem with instance and optional trace_id context.
Sourcepub const fn odata_errors_invalid_filter_v1() -> Self
pub const fn odata_errors_invalid_filter_v1() -> Self
Returns the error code for gts.hx.core.errors.err.v1~hx.odata.errors.invalid_filter.v1.
Sourcepub const fn odata_errors_invalid_orderby_v1() -> Self
pub const fn odata_errors_invalid_orderby_v1() -> Self
Returns the error code for gts.hx.core.errors.err.v1~hx.odata.errors.invalid_orderby.v1.
Sourcepub const fn odata_errors_invalid_cursor_v1() -> Self
pub const fn odata_errors_invalid_cursor_v1() -> Self
Returns the error code for gts.hx.core.errors.err.v1~hx.odata.errors.invalid_cursor.v1.
Sourcepub const fn odata_errors_internal_v1() -> Self
pub const fn odata_errors_internal_v1() -> Self
Returns the error code for gts.hx.core.errors.err.v1~hx.odata.errors.internal.v1.
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more