TypeDecl::attr_str
pub fn attr_str(string attr, string key, string fallback) -> string Import
Source: use macro::{TypeDecl}; compiler/src/prelude/macro.hy No documentation yet.
Called on a TypeDecl value as value.attr_str(…).
Parameters#
| Name | Type |
|---|---|
attr | string |
key | string |
fallback | string |
Returns#
string
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::fields: Class fields (empty for an enum).TypeDecl::variants: Enum variants (empty for a class).TypeDecl::has_attr