TypeDecl::fields
pub fn fields() -> Vec<Field> Import
Source: use macro::{TypeDecl}; compiler/src/prelude/macro.hy Class fields (empty for an enum).
Called on a TypeDecl value as value.fields(…).
Returns#
Vec<Field>
See also#
TypeDecl: A class or enum declaration handed to a derive or attribute macro.TypeDecl::is_classTypeDecl::self_type: The type as written in a signature:Name, orName<T, U>for a generic type.TypeDecl::impl_head: Head of animpl Trait for …for this type:Name, or for a generic typeName<T: bound, U: bound>, every type parameter bounded bybound("Show","Ord + Eq").TypeDecl::is_enumTypeDecl::variants: Enum variants (empty for a class).TypeDecl::has_attrTypeDecl::attr_str