[][src]Trait conjure_error::ErrorType

pub trait ErrorType {
    fn code(&self) -> ErrorCode;
fn name(&self) -> &str;
fn instance_id(&self) -> Option<Uuid>;
fn safe_args(&self) -> &'static [&'static str]; fn with_instance_id(self, instance_id: Uuid) -> WithInstanceId<Self>
    where
        Self: Sized
, { ... } }

A trait implemented by Conjure error types.

Required methods

fn code(&self) -> ErrorCode

Returns the error's code.

fn name(&self) -> &str

Returns the error's name.

The name must be formatted like NamespaceName:ErrorName.

fn instance_id(&self) -> Option<Uuid>

Returns the error's instance ID, if it stores one.

Conjure-generated error types return None, but other implementations like those for SerializableError and WithInstanceId return a value.

fn safe_args(&self) -> &'static [&'static str]

Returns a sorted slice of the names of the error's safe parameters.

Loading content...

Provided methods

fn with_instance_id(self, instance_id: Uuid) -> WithInstanceId<Self> where
    Self: Sized

Wraps the error in another that overrides its instance ID.

Loading content...

Implementations on Foreign Types

impl<'_, T: ?Sized> ErrorType for &'_ T where
    T: ErrorType
[src]

Loading content...

Implementors

impl ErrorType for Conflict[src]

impl ErrorType for FailedPrecondition[src]

impl ErrorType for Internal[src]

impl ErrorType for InvalidArgument[src]

impl ErrorType for NotFound[src]

impl ErrorType for PermissionDenied[src]

impl ErrorType for RequestEntityTooLarge[src]

impl ErrorType for SerializableError[src]

impl ErrorType for Timeout[src]

impl<T> ErrorType for WithInstanceId<T> where
    T: ErrorType
[src]

Loading content...