#[non_exhaustive]pub struct ErrorCodeInfo {
pub code: String,
pub description: String,
pub documentation_url: Option<String>,
pub retryable: bool,
}Expand description
Metadata for a registered error code.
Marked #[non_exhaustive] so future minor releases can add new
fields (e.g. severity, tags, owner) without breaking callers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: StringThe error code (e.g. “AUTH-001”)
description: StringA human-readable description of this error type
documentation_url: Option<String>A URL to documentation about this error, if available
retryable: boolWhether this error is expected to be retryable
Trait Implementations§
Source§impl Clone for ErrorCodeInfo
impl Clone for ErrorCodeInfo
Source§fn clone(&self) -> ErrorCodeInfo
fn clone(&self) -> ErrorCodeInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ErrorCodeInfo
impl RefUnwindSafe for ErrorCodeInfo
impl Send for ErrorCodeInfo
impl Sync for ErrorCodeInfo
impl Unpin for ErrorCodeInfo
impl UnsafeUnpin for ErrorCodeInfo
impl UnwindSafe for ErrorCodeInfo
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