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
, { ... } }
Expand description

A trait implemented by Conjure error types.

Required methods

Returns the error’s code.

Returns the error’s name.

The name must be formatted like NamespaceName:ErrorName.

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.

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

Provided methods

Wraps the error in another that overrides its instance ID.

Implementations on Foreign Types

Implementors