Decoder

Trait Decoder 

Source
pub trait Decoder {
    type Output;

    // Required method
    fn run(&self, value: Value) -> Result<Self::Output>;
}
Expand description

Some logic that turns a Value into some Output.

Required Associated Types§

Source

type Output

The output of the Decoder.

Required Methods§

Source

fn run(&self, value: Value) -> Result<Self::Output>

Runs the Decoder.

Implementors§

Source§

impl<F, T> Decoder for F
where F: Fn(Value) -> Result<T>,