[go: up one dir, main page]

Macro buffer_ct_variable

Source
macro_rules! buffer_ct_variable {
    (
        $(#[$attr:meta])*
        $vis:vis struct $name:ident<$out_size:ident>($core_ty:ty);
        exclude: SerializableState;
        // Ideally, we would use `$core_ty::OutputSize`, but unfortunately the compiler
        // does not accept such code. The likely reason is this issue:
        // https://github.com/rust-lang/rust/issues/79629
        max_size: $max_size:ty;
    ) => { ... };
    (
        $(#[$attr:meta])*
        $vis:vis struct $name:ident<$out_size:ident>($core_ty:ty);
        // Ideally, we would use `$core_ty::OutputSize`, but unfortunately the compiler
        // does not accept such code. The likely reason is this issue:
        // https://github.com/rust-lang/rust/issues/79629
        max_size: $max_size:ty;
    ) => { ... };
}
Expand description

Creates a buffered wrapper around block-level “core” type which implements variable output size traits with output size selected at compile time.