Method in macro · Attr compiler

Attr::arg

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

Value of the key = value argument, or fallback.

Called on a Attr value as value.arg(…).

Parameters#

NameType
keystring
fallbackstring

Returns#

string

See also#

  • Attr: #[name(args)] on a declaration, field or variant.
  • Attr::src: The attribute as written: #[name(key = "v", 2)].
  • Attr::has: True when the attribute has an argument named key, or a bare key.
↑ ↓ navigate ↵ open