Skip to main content

AsError

Trait AsError 

Source
pub trait AsError {
    type Target: ErrorDiagnostic;

    // Required method
    fn as_diag(&self) -> &Self::Target;
}
Expand description

Provides access to an error’s diagnostic representation.

Required Associated Types§

Source

type Target: ErrorDiagnostic

Diagnostic error type.

Required Methods§

Source

fn as_diag(&self) -> &Self::Target

Returns the diagnostic error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§