Skip to main content

CustomErrorFactory

Trait CustomErrorFactory 

Source
pub trait CustomErrorFactory {
    // Required method
    fn create_error(&self) -> WriteError;
}
Expand description

Trait to define custom error factories for WriteError

This trait allows extending WriteError with custom error constructors while allowing both library and user code to define their own error types.

Required Methods§

Source

fn create_error(&self) -> WriteError

Create an error from this factory

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§