Macro jxl_bitstream::make_def

source ยท
macro_rules! make_def {
    (@ty; $c:literal) => { ... };
    (@ty; u($n:literal)) => { ... };
    (@ty; u($n:literal); UnpackSigned) => { ... };
    (@ty; $c:literal + u($n:literal)) => { ... };
    (@ty; $c:literal + u($n:literal); UnpackSigned) => { ... };
    (@ty; U32($($args:tt)*)) => { ... };
    (@ty; U32($($args:tt)*); UnpackSigned) => { ... };
    (@ty; U64) => { ... };
    (@ty; U64; UnpackSigned) => { ... };
    (@ty; F16) => { ... };
    (@ty; Bool) => { ... };
    (@ty; Enum($enum:ty)) => { ... };
    (@ty; Bundle($bundle:ty)) => { ... };
    (@ty; Vec[$($inner:tt)*]; $count:expr) => { ... };
    (@ty; Array[$($inner:tt)*]; $count:expr) => { ... };
    ($(#[$attrs:meta])* $v:vis struct $bundle_name:ident {
        $($(#[$fieldattrs:meta])* $vfield:vis $field:ident: ty($($expr:tt)*) $(ctx($ctx_for_field:expr))? $(cond($cond:expr))? $(default($def_expr:expr))? ,)*
    }) => { ... };
}