2-3 years ago there was a conference talk, which I recall as wrapping Locks in a type ladder. So the compiler ensures that everyone can only obtain them in the same order. Happy enough that this was now common know-how, I did not bookmark it. And now I can’t find it anymore. Do you have the link?
In fact I find very few crates related to deadlocks, and little else. There is a 6 years old Compile time lock ordering approach to deadlocks with an interesting but rather verbose solution. That got almost no reaction.