Learning Rust but need some example functions if you can share

Can somebody share their discount function code built with rust?

I’m not a rust developer (yet) but trying to learn. Specifically, need to see how can I access cart line → merchandise → product

But would be great to see other things as well.

Much appreciated.

Hey Jacob - have you tried generating Rust examples using the dev assistant: Shopify Functions support in Dev Assistant and the shopify.dev MCP server - Shopify developer changelog