Field
class Field Import
Source: use macro::{Field}; compiler/src/prelude/macro.hy A class field, or a field of a record enum variant.
Fields#
| Field | Type | Description |
|---|---|---|
name | Ident | |
ty | TypeRef | |
is_pub | bool | |
attrs | Vec<Attr> | |
docs | Vec<string> |
Methods#
| Name | Description |
|---|---|
has_attr | True when the field carries #[name(...)]. |
attr_str | #[attr(key = "value")] on this field, or fallback. |
See also#
Code: Generated coil source: declarations, an expression, statements or a type.Ident: A name as written in source.Expr: A function-style macro argument as written:f(1),a + b,"text".TypeRef: A type annotation as written (not resolved):Vec<int>,json::Value.AttrArg: Onekey = value(or positionalvalue, withkey == "") attribute argument.Attr:#[name(args)]on a declaration, field or variant.Variant: One enum variant.TypeDecl: A class or enum declaration handed to a derive or attribute macro.