pub trait ErrorType {
// Required methods
fn code() -> ErrorCode;
fn name() -> &'static str;
fn safe_args() -> &'static [&'static str];
// Provided methods
fn instance_id(&self) -> Option<Uuid> { ... }
fn with_instance_id(self, instance_id: Uuid) -> WithInstanceId<Self>
where Self: Sized { ... }
}Expand description
A trait implemented by Conjure error types.
Required Methods§
Provided Methods§
Sourcefn instance_id(&self) -> Option<Uuid>
fn instance_id(&self) -> Option<Uuid>
Returns the error’s instance ID, if it stores one.
The default implementation returns None.
Sourcefn with_instance_id(self, instance_id: Uuid) -> WithInstanceId<Self>where
Self: Sized,
fn with_instance_id(self, instance_id: Uuid) -> WithInstanceId<Self>where
Self: Sized,
Wraps the error in another that overrides its instance ID.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".