TypePurposeThread SafetyUse CasePerformance
Arc<T>Share ownership of data across threads with reference counting.YesShare immutable or shareable data across threads; no direct mutation.Low overhead; atomic counter ops.
Mutex<T>Protect shared data with mutual exclusion; allows one thread to access at a time.YesExclusive access to mutable data; single-threaded writes with blocking.Locking overhead; blocks threads.
RwLock<T>Allow multiple readers or one writer to access shared data.YesMultiple readers with occasional writes; read-heavy workloads.More complex than Mutex; read/write locks.
Rc<T>Reference counting for single-threaded use; like Arc but not thread-safe.NoShare data within a single thread; cheaper than Arc.Lower overhead than Arc (non-atomic).
RefCell<T>Single-threaded runtime borrow checking for mutable data.NoDynamic borrowing in single-threaded code; pairs with Rc for shared mutability.Runtime borrow checks; no thread safety.