FormatEncoderDyn

Trait FormatEncoderDyn 

Source
pub trait FormatEncoderDyn<V: ?Sized, E = Box<dyn Error>> {
    // Required method
    fn encode_dyn(&mut self, writer: &mut dyn Write, value: &V) -> Result<(), E>;
}
Expand description

A trait object version of FormatEncoder for dynamic dispatch

Required Methods§

Source

fn encode_dyn(&mut self, writer: &mut dyn Write, value: &V) -> Result<(), E>

Encodes the given value into the provided writer

Implementors§

Source§

impl<T, V, E> FormatEncoderDyn<V, E> for T
where T: FormatEncoder<V> + ?Sized, V: ?Sized, T::EncodeError: Into<E>,