# Rust Python Formatter For the formatter, we would like to implement `Format` from the rust_formatter crate for all AST nodes, defined in the rustpython_parser crate. This violates rust's orphan rules. We therefore generate in `generate.py` a newtype for each AST node with implementations of `FormatNodeRule`, `FormatRule`, `AsFormat` and `IntoFormat` on it. ![excalidraw showing the relationships between the different types](orphan_rules_in_the_formatter.svg)