<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/cn/tag/leveled-hash-map/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Sun, 22 Nov 2026 19:03:12 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/tag/leveled-hash-map/feed/" rel="self" type="application/rss+xml"/><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>扩充 Rust 编程语言内置的 HashMap，让它拥有阶层结构</title><link>https://magiclen.org/cn/leveled-hash-map/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt>
在开发程序时，我们常会使用 HashMap 来保存 key-value 结构的数据。但很多时候我们的 key-value 数据会有不只一层，例如一个男女分班的学校，我们就需要有性别、班级、学号这三层的 key-value 结构，以确保各层的数据不会有重复的情况发生。或是可以分成国家、一级行政区、二级行政区等多层数据的世界地图。]]></description><category>Rust</category><category>Rust</category><category>leveled-hash-map</category><guid>https://magiclen.org/cn/leveled-hash-map</guid><pubDate>Sun, 9 Dec 2018 20:00:59 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>