fn tuple_body_meta(
    item: &Item,
    enum_item: Option<&Item>,
    tuple: ast::Parenthesized<ast::Field, T![,]>,
) -> CompileMetaKind {
    let type_hash = Hash::type_hash(item);

    let tuple = CompileMetaTuple {
        args: tuple.len(),
        hash: Hash::type_hash(item),
    };

    match enum_item {
        Some(enum_item) => CompileMetaKind::TupleVariant {
            type_hash,
            enum_item: enum_item.clone(),
            tuple,
        },
        None => CompileMetaKind::TupleStruct { type_hash, tuple },
    }
}
/// Construct metadata for an empty body.
Construct metadata for an empty body.
Construct metadata for an empty body .
fn tuple_body_meta(
    item: &Item,
    enum_item: Option<&Item>,
    tuple: ast::Parenthesized<ast::Field, T![,]>,
) -> CompileMetaKind {
    let type_hash = Hash::type_hash(item);
    let tuple = CompileMetaTuple {
        args: tuple.len(),
        hash: Hash::type_hash(item),
    };
    match enum_item {
        Some(enum_item) => CompileMetaKind::TupleVariant {
            type_hash,
            enum_item: enum_item.clone(),
            tuple,
        },
        None => CompileMetaKind::TupleStruct { type_hash, tuple },
    }
}
fn tuple_body_meta ( item : & Item , enum_item : Option < & Item > , tuple : ast :: Parenthesized < ast :: Field , T ! [ ] > , ) -> CompileMetaKind { let type_hash = Hash :: type_hash ( item ) ; let tuple = CompileMetaTuple { args : tuple . len ( ) , hash : Hash :: type_hash ( item ) , } ; match enum_item { Some ( enum_item ) => CompileMetaKind :: TupleVariant { type_hash , enum_item : enum_item . clone ( ) , tuple , } , None => CompileMetaKind :: TupleStruct { type_hash , tuple } , } }
Construct metadata for an empty body.
Construct metadata for an empty body .
item
&Item
enum_item
Option<&Item>
tuple
ast::Parenthesized<ast::Field, T![,]>
item
&Item
enum_item
Option<&Item>
tuple
ast::Parenthesized<ast::Field, T![,]>