Skip to main content

ErrorProtocol

Trait ErrorProtocol 

Source
pub trait ErrorProtocol: Protocol {
    type ErrorMeta: ProtocolWire;

    // Required methods
    fn error_severity(&self, error_key: &str) -> ResponseSeverity;
    fn format_error_label(&self, error_key: &str) -> String;
}
Expand description

Error / fault documentation aspects.

Required Associated Types§

Source

type ErrorMeta: ProtocolWire

Typed error metadata payload.

Required Methods§

Source

fn error_severity(&self, error_key: &str) -> ResponseSeverity

Map an error key to ResponseSeverity.

Source

fn format_error_label(&self, error_key: &str) -> String

Human-readable error label for documentation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§