pub trait FormatError {
type Error;
// Required methods
fn format_error(&self, spec: &ConversionSpec, error: &Self::Error) -> String;
fn format_missing(&self, spec: &ConversionSpec) -> String;
fn format_type_error(&self, spec: &ConversionSpec, arg: &Arg) -> String;
}Expand description
A trait for formatting conversion specifiers that failed, were skipped, or were missing.
Required Associated Types§
Required Methods§
Sourcefn format_error(&self, spec: &ConversionSpec, error: &Self::Error) -> String
fn format_error(&self, spec: &ConversionSpec, error: &Self::Error) -> String
Renders a conversion specifier that failed with a domain-specific error.
Sourcefn format_missing(&self, spec: &ConversionSpec) -> String
fn format_missing(&self, spec: &ConversionSpec) -> String
Renders a conversion specifier that was missing from the supplied arguments.
Sourcefn format_type_error(&self, spec: &ConversionSpec, arg: &Arg) -> String
fn format_type_error(&self, spec: &ConversionSpec, arg: &Arg) -> String
Renders a conversion specifier that decoded successfully but failed to format (type mismatch).