Skip to main content

encoder_newtype_exact

Macro encoder_newtype_exact 

Source
macro_rules! encoder_newtype_exact {
    (
        $(#[$($struct_attr:tt)*])*
        pub struct $name:ident<$lt:lifetime>($encoder:ty);
    ) => { ... };
}
Expand description

Implements a newtype around an exact-size encoder which implements the Encoder and ExactSizeEncoder traits by forwarding to the wrapped encoder.