<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unsafecell on rustbites</title><link>https://www.rustbites.com/tags/unsafecell/</link><description>Recent content in Unsafecell on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 22 May 2026 07:44:11 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/unsafecell/index.xml" rel="self" type="application/rss+xml"/><item><title>154. UnsafeCell&lt;T&gt; — The Primitive Every Interior-Mutability Type Is Built On</title><link>https://www.rustbites.com/posts/bite-154/</link><pubDate>Thu, 21 May 2026 17:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-154/</guid><description>&lt;p&gt;This morning&amp;rsquo;s &lt;a href="https://www.rustbites.com/posts/bite-153/"&gt;OnceCell / LazyCell&lt;/a&gt; bite — and &lt;code&gt;Cell&lt;/code&gt;, &lt;code&gt;RefCell&lt;/code&gt;, &lt;code&gt;Mutex&lt;/code&gt;, &lt;code&gt;RwLock&lt;/code&gt;, &lt;code&gt;OnceLock&lt;/code&gt;, every atomic — all bottom out at the same type: &lt;code&gt;UnsafeCell&amp;lt;T&amp;gt;&lt;/code&gt;. It is the one and only legal way in Rust to mutate through a shared reference. You&amp;rsquo;ll almost never type its name, but knowing what it does explains why all the rest exist.&lt;/p&gt;</description></item></channel></rss>