Expand description
A proc-macro for writing functions in Rust that can be called from Starlark.
Macros§
- starlark_
attrs - Generate
{has,get,dir}_attrin theStarlarkValueimpl block that proxy to the ones generated byderive(StarlarkAttrs)
Attribute Macros§
- starlark_
internal_ bc - Stubs for Starlark bytecode interpreter.
- starlark_
internal_ vtable - starlark_
module - Write Starlark modules concisely in Rust syntax.
- starlark_
value - Generate missing elements of
StarlarkValuetrait when this attribute is applied to an impl block ofStarlarkValue.
Derive Macros§
- Alloc
Frozen Value - Derive the
AllocFrozenValuetrait. - Alloc
Value - Derive the
AllocValuetrait. - Coerce
- Freeze
- Derive the
Freezetrait. - NoSerialize
- Derive the
NoSerializetrait for serde. - Provides
Static Type - Derive the
ProvidesStaticTypetrait. Requires the type has no type arguments, no constant arguments, and at most one lifetime argument. - Starlark
Attrs - Derive accessor methods that are designed to be used from {has,get,dir}_attr
in an
impl StarlarkValueblock. All fields in the struct that are not marked with #[starlark(skip)] are exported to Starlark code as attributes. NOTE: Any usage must also callstarlark_attrs!()in the impl block forStarlarkValue, otherwise the generated attr methods will not be used. - Starlark
Type Repr - Derive the
StarlarkTypeReprtrait. - Trace
- Derive the
Tracetrait. - Unpack
Value - Derive the
UnpackValuetrait. - Visit
Span Mut