We wrote about the same idea in 2018 when implementing multi-party computation protocol in Rust: https://medium.com/@cathieyun/bulletproof-multi-party-comput...
The key idea is to make cryptographically-incorrect usage of the API impossible to compile because we provide the library, but you put networking and your app logic around it.
Specifically, the protocol fails if you allow a counter-party to retry interaction from some intermediate state instead of starting over. Move semantics in Rust allow us to make sure you won't be able to misuse our library in your app.