macro_rules! benchmarker {
    (
        $lt:lifetime $({$($options:tt)*})?

        $(#[$($buffer_meta:meta)*])*
        $buffer_vis:vis fn buffer() -> $buffer:ty $build_buffer:block

        $(#[$($reset_meta:meta)*])*
        $reset_vis:vis fn reset<T>(&mut $reset_self:ident, $size_hint:tt: usize, $reset_value:tt: &T)
        $(where
            T: $reset_bound:path $(,)?)?
        $reset:block

        $(#[$($encode_meta:meta)*])*
        $encode_vis:vis fn encode<T>(&mut $encode_self:ident, $encode_value:ident: &T) -> Result<$encode_return:ty, $encode_error:ty>
        $(where
            T: $encode_bound:path $(,)?)?
        $encode:block

        $(#[$($decode_meta:meta)*])*
        $decode_vis:vis fn decode<T>(&$decode_self:ident) -> Result<$decode_return:ty, $decode_error:ty>
        $(where
            $(for<$for_lt:lifetime>)? T: $decode_bound:path $(,)?)*
        $decode:block
    ) => { ... };
}
Expand description

Super macro to help build benchmarkers without too much of a fuzz.

Benchmarking might juggle a fair bit of state around depending on the exact implementation, so implementing the API manually is also an option.