惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
腾讯CDC
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
博客园_首页
D
DataBreaches.Net
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
月光博客
月光博客
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Vercel News
Vercel News
WordPress大学
WordPress大学
J
Java Code Geeks
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42

LWN.net comments

blocking algif_aead side effects? tcmalloc's weird hack [LWN.net] Fixed? [LWN.net] mpd [LWN.net] Userspace AX.25 [LWN.net] RIP [LWN.net] My two cents... [LWN.net] pipx [LWN.net] Tragedy [LWN.net] A young man destined for glory [LWN.net] And 'less' won't let you search [LWN.net] A great loss [LWN.net] Sad and shocking news [LWN.net] Easy migration from Clementine [LWN.net] Sad coincidence [LWN.net] GNOME is actually usable thanks to Seth et al [LWN.net] Sad news :( [LWN.net] armhf supports preempt_rt [LWN.net] MusicBrainz accurracy [LWN.net] On open source maintainership [LWN.net] Let's stop here [LWN.net] Not a new thing [LWN.net] uv is indeed great pgmoneta Some comments on this on a Postgres blog feed [LWN.net] uv [LWN.net] going to Debian [LWN.net] Upgrading 64-bit-capable systems to 64-bit kernels? [LWN.net] Free Software foundations Maintainers can wait for code review but not for publish review?
Concrete steps toward RFC 3550 (new Range types)
NYKevin · 2026-04-21 · via LWN.net comments
To further explain this for people not steeped in Rust standard library traits: * IntoIterator should be understood as "a collection that we can iterate over, or a reference or view into such a collection." The term "collection" is meant somewhat liberally, for example an Option<T> is regarded as a collection which is either empty or contains exactly one T object. * Iterator should be understood as "a handle produced by an in-progress iteration operation, or an object which can be trivially used as such a handle." Every Iterator is also considered an IntoIterator. This can be justified either on the basis that every iterator is a view into a container, or on the far more prosaic basis that converting an iterator into an iterator is trivial. * For completeness, FromIterator should be understood as "a collection that we can build from a sequence of individual values." Implementing this trait enables Iterator::collect() to produce a given container type. Most collections implement both FromIterator and IntoIterator, but references or views only implement IntoIterator because FromIterator is designed to produce an owned collection. Also, some collections (like the aforementioned Option<T>) have invariants which cannot be enforced through collect()'s signature (Option can only hold one object), so they don't implement FromIterator at all. In C++ terms, FromIterator is an array, vector, map, etc., Iterator is the type returned by std::begin() (or the equivalent method), and IntoIterator is either of the above as well as view types (std::span), pointers, and whatnot. These equivalences are not exact because Rust does iteration differently to C++, but that is a story for another time.