Skip to main content

Crate starlark_derive

Crate starlark_derive 

Source
Expand description

A proc-macro for writing functions in Rust that can be called from Starlark.

Macros§

starlark_attrs
Generate {has,get,dir}_attr in the StarlarkValue impl block that proxy to the ones generated by derive(StarlarkAttrs)

Attribute Macros§

starlark_internal_bc
Stubs for Starlark bytecode interpreter.
starlark_internal_vtable
starlark_module
Write Starlark modules concisely in Rust syntax.
starlark_pagable_typetag
Starlark-flavored #[pagable_typetag]. On a trait: emits a sealed marker. On impl Trait for Foo: emits the recovery bridge and asserts the marker.
starlark_value
Generate missing elements of StarlarkValue trait when this attribute is applied to an impl block of StarlarkValue.
type_matcher
Attribute macro for impl TypeMatcher for X blocks.

Derive Macros§

AllocFrozenValue
Derive the AllocFrozenValue trait.
AllocValue
Derive the AllocValue trait.
Coerce
Freeze
Derive the Freeze trait.
NoSerialize
Derive the NoSerialize trait for serde.
ProvidesStaticType
Derive the ProvidesStaticType trait. Requires the type has no type arguments, no constant arguments, and at most one lifetime argument.
StarlarkAttrs
Derive accessor methods that are designed to be used from {has,get,dir}_attr in an impl StarlarkValue block.
StarlarkDeserialize
Derive the StarlarkDeserialize trait.
StarlarkPagable
Derive both StarlarkSerialize and StarlarkDeserialize traits.
StarlarkPagablePanic
Derive panicking StarlarkSerialize and StarlarkDeserialize impls.
StarlarkPagableViaPagable
Derive StarlarkSerialize / StarlarkDeserialize impls that bridge to the type’s pagable::PagableSerialize / pagable::PagableDeserialize impls.
StarlarkSerialize
Derive the StarlarkSerialize trait.
StarlarkTypeRepr
Derive the StarlarkTypeRepr trait.
Trace
Derive the Trace trait.
UnpackValue
Derive the UnpackValue trait.
VisitSpanMut