Method in macro · Field compiler

Field::attr_str

pub fn attr_str(string attr, string key, string fallback) -> string
Import
use macro::{Field};
Source: compiler/src/prelude/macro.hy

#[attr(key = "value")] on this field, or fallback.

Called on a Field value as value.attr_str(…).

Parameters#

NameType
attrstring
keystring
fallbackstring

Returns#

string

See also#

  • Field: A class field, or a field of a record enum variant.
  • Field::has_attr: True when the field carries #[name(...)].
↑ ↓ navigate ↵ open