Trait ErrorConvert

Source
pub trait ErrorConvert<E> {
    // Required method
    fn convert(self) -> E;
}
Expand description

Equivalent of From implementation to avoid orphan rules in bits parsers

Required Methods§

Source

fn convert(self) -> E

Transform to another error type

Implementations on Foreign Types§

Source§

impl ErrorConvert<()> for ()

Implementors§

Source§

impl ErrorConvert<EmptyError> for EmptyError

Source§

impl<C> ErrorConvert<ContextError<C>> for ContextError<C>

Source§

impl<E1, E2> ErrorConvert<ErrMode<E2>> for ErrMode<E1>
where E1: ErrorConvert<E2>,

Source§

impl<I, C> ErrorConvert<TreeError<(I, usize), C>> for TreeError<I, C>

Available on crate feature std only.
Source§

impl<I, C> ErrorConvert<TreeError<I, C>> for TreeError<(I, usize), C>

Available on crate feature std only.
Source§

impl<I: Clone> ErrorConvert<InputError<(I, usize)>> for InputError<I>

Source§

impl<I: Clone> ErrorConvert<InputError<I>> for InputError<(I, usize)>