Keep in mind that
&mut in Rust is somewhat misleading. It's not required for mutation. It means exclusive access.
So your question is a bit self-contradictory. Because depending how you look at it, either all containers can return
&mut in a thread-safe manner, or such thing can't possibly exist.
You can get exclusive
&mut if you wrap a container in a
Mutex, or anything else that guarantees exclusive access. But if it's exclusive access, then it's always exclusive to one thread by definition.
OTOH there many ways in Rust to mutate data behind shared references. But these aren't exclusive
&mut ones, but shared
& references (e.g.
AtomicUsize and such).
So you can either use regular containers and locks (which are the "thread-safe containers"), or find containers do some clever lock-free access.