TypeDecl::self_type
pub fn self_type() -> Code Import
Source: use macro::{TypeDecl}; compiler/src/prelude/macro.hy The type as written in a signature: Name, or Name<T, U> for a generic type.
Called on a TypeDecl value as value.self_type(…).
Returns#
Code
See also#
TypeDecl: A class or enum declaration handed to a derive or attribute macro.TypeDecl::is_classTypeDecl::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::fields: Class fields (empty for an enum).TypeDecl::variants: Enum variants (empty for a class).TypeDecl::has_attrTypeDecl::attr_str