pub trait InputConverter: Debug {
    type From: Input;
    type To: Input;

    fn convert(&mut self, input: Self::From) -> Result<Self::To, Error>;
}
Expand description

Convert between two input types with a state

Required Associated Types§

source

type From: Input

Source type

source

type To: Input

Destination type

Required Methods§

source

fn convert(&mut self, input: Self::From) -> Result<Self::To, Error>

Convert the src type to the dest

Implementors§

source§

impl<F, T> InputConverter for ClosureInputConverter<F, T>where
    F: Input,
    T: Input,

§

type From = F

§

type To = T

source§

impl<I> InputConverter for NopInputConverter<I>where
    I: Input,

§

type From = I

§

type To = I