Method in macro · Field compiler

Field::has_attr

pub fn has_attr(string name) -> bool
Import
use macro::{Field};
Source: compiler/src/prelude/macro.hy

True when the field carries #[name(...)].

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

Parameters#

NameType
namestring

Returns#

bool

See also#

  • Field: A class field, or a field of a record enum variant.
  • Field::attr_str: #[attr(key = "value")] on this field, or fallback.
↑ ↓ navigate ↵ open