Skip to main content

codec_enum

Macro codec_enum 

Source
macro_rules! codec_enum {
    ($ty:ident {
        $($variant:ident $({ $($field:ident),* $(,)? })? $(( $($elem:ident),* $(,)? ))? = $tag:literal),* $(,)?
    }) => { ... };
}
Expand description

Encode and Decode from the variants and their tags: Unit = 0, Named { a } = 1, Tuple(a) = 2.