Derive Macro starlark::values::StarlarkAttrs
source · #[derive(StarlarkAttrs)]
{
// Attributes available to this derive:
#[starlark]
}
Expand description
Derive accessor methods that are designed to be used from {has,get,dir}_attr
in an impl StarlarkValue
block. All fields in the struct that are not
marked with #[starlark(skip)] are exported to Starlark code as attributes.
NOTE: Any usage must also call starlark_attrs!()
in the impl block for
StarlarkValue
, otherwise the generated attr methods will not be used.