Expand description
Procedural macros for the monty Python interpreter.
#[derive(FromArgs)]—ArgValues→ typed struct (positional/kwarg dispatch, defaults, type coercion viaFromValue, refcount cleanup).#[derive(ToArgs)]— typed struct → host call arguments.
Generated code is internal to monty (FromArgs) and monty-types (ToArgs).
See the crate README.md for usage and the docstrings on StructAttrs /
FieldKind in from_args.rs for the full attribute surface.
Derive Macros§
- From
Args - Derive
FromArgs::from_args. Each struct field becomes a Python parameter; the generated body parses anArgValuesand populates the struct, returningRunResult<Self>. - ToArgs
- Projects a struct into host call arguments using
#[from_args(...)]attributes.varargsfields contribute one positional argument per element.