Skip to main content

ErrorInfo

Trait ErrorInfo 

Source
pub trait ErrorInfo<'s, T, R> {
    type Format: Display;

    // Required method
    fn into_info(&'s self) -> Info<T, R, Self::Format>;
}
Expand description

Trait for types which can be used to construct error information.

To call functions expecting this trait, use the wrapper types defined in this module Token, Range, Format or Static/&'static str

Required Associated Types§

Required Methods§

Source

fn into_info(&'s self) -> Info<T, R, Self::Format>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'s, 'a, T, R, F> ErrorInfo<'s, T, R> for &'a F
where F: ErrorInfo<'s, T, R>,

Source§

type Format = <F as ErrorInfo<'s, T, R>>::Format

Source§

fn into_info(&'s self) -> Info<T, R, Self::Format>

Source§

impl<'s, R> ErrorInfo<'s, char, R> for char

Source§

type Format = &'static str

Source§

fn into_info(&self) -> Info<char, R, Self::Format>

Source§

impl<'s, T, R> ErrorInfo<'s, T, R> for &'static str

Source§

type Format = &'static str

Source§

fn into_info(&self) -> Info<T, R, Self::Format>

Source§

impl<R> ErrorInfo<'_, u8, R> for u8

Source§

type Format = &'static str

Source§

fn into_info(&self) -> Info<Self, R, Self::Format>

Implementors§

Source§

impl<'s, T, R, F> ErrorInfo<'s, T, R> for Format<F>
where F: Display + 's,

Source§

impl<'s, T, R, F> ErrorInfo<'s, T, R> for Info<T, R, F>
where T: Clone, R: Clone, F: Display + 's,

Source§

impl<'s, T, R> ErrorInfo<'s, T, R> for Range<R>
where R: Clone,

Source§

type Format = &'static str

Source§

impl<'s, T, R> ErrorInfo<'s, T, R> for Static

Source§

type Format = &'static str

Source§

impl<'s, T, R> ErrorInfo<'s, T, R> for Token<T>
where T: Clone,

Source§

type Format = &'static str