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

推荐订阅源

罗磊的独立博客
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
A
About on SuperTechFans
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
D
DataBreaches.Net
B
Blog
博客园 - 【当耐特】
爱范儿
爱范儿
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
WordPress大学
WordPress大学
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
雷峰网
雷峰网
量子位
G
Google Developers Blog

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.