How to avoid SQL injection attacks in Rust?

57 points szabgab

As I am working on an article using SurrealDB I wanted to mention SQL injection attacks and how to avoid them. To my surprise my go-to web site for SQL injection attacks does not have Rust at all.

The general suggestion is of course to use placeholders, but it might be worth to have specific examples on that site.