<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Enums on rustbites</title><link>https://www.rustbites.com/tags/enums/</link><description>Recent content in Enums on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 11 May 2026 09:32:11 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/enums/index.xml" rel="self" type="application/rss+xml"/><item><title>130. mem::discriminant — Compare Enum Variants, Ignore the Payload</title><link>https://www.rustbites.com/posts/bite-130/</link><pubDate>Sun, 10 May 2026 09:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-130/</guid><description>&lt;p&gt;You want to know &amp;ldquo;is this another &lt;code&gt;Click&lt;/code&gt;?&amp;rdquo; — not whether the coordinates match. Hand-rolling a &lt;code&gt;match&lt;/code&gt; for every variant gets old fast. &lt;code&gt;std::mem::discriminant&lt;/code&gt; answers that question in one call.&lt;/p&gt;</description></item></channel></rss>