Github Tracking Issue for {HashMap,BTreeMap}::into_{keys,values} · Issue #75294...
source link: https://github.com/rust-lang/rust/issues/75294
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Feature gate: #![feature(map_into_keys_values)]
This is a tracking issue for {HashMap,BTreeMap}::into_{keys,values}
.
Public API
// alloc::collections::btree_map impl<K, V> BTreeMap<K, V> { pub fn into_keys(self) -> IntoKeys<K, V>; pub fn into_values(self) -> IntoValues<K, V>; } pub struct IntoKeys<K, V>; pub struct IntoValues<K, V>; impl<K, V> Iterator for IntoKeys<K, V> { type Item = K; } impl<K, V> DoubleEndedIterator for IntoKeys<K, V> {} impl<K, V> ExactSizeIterator for IntoKeys<K, V> {} impl<K, V> FusedIterator for IntoKeys<K, V> {} impl<K: Debug, V> Debug for IntoKeys<K, V> {} impl<K, V> Iterator for IntoValues<K, V> { type Item = V; } impl<K, V> DoubleEndedIterator for IntoValues<K, V> {} impl<K, V> ExactSizeIterator for IntoValues<K, V> {} impl<K, V> FusedIterator for IntoValues<K, V> {} impl<K, V: Debug> Debug for IntoValues<K, V> {} // alloc::collections::hash_map impl<K: Eq + Hash, V, S: BuildHasher> HashMap<K, V, S> { pub fn into_keys(self) -> IntoKeys<K, V>; pub fn into_values(self) -> IntoValues<K, V>; } pub struct IntoKeys<K, V>; pub struct IntoValues<K, V>; impl<K, V> Iterator for IntoKeys<K, V> { type Item = K; } impl<K, V> ExactSizeIterator for IntoKeys<K, V> {} impl<K, V> FusedIterator for IntoKeys<K, V> {} impl<K: Debug, V> Debug for IntoKeys<K, V> {} impl<K, V> Iterator for IntoValues<K, V> { type Item = V; } impl<K, V> ExactSizeIterator for IntoValues<K, V> {} impl<K, V> FusedIterator for IntoValues<K, V> {} impl<K, V: Debug> Debug for IntoValues<K, V> {}
Steps / History
Unresolved Questions
- None yet.
Recommend
-
9
Why doesn't Rust's BTreeMap have a with_capacity() method? Nov 30, 2020 Disclaimer: I discovered a previous explanation here
-
9
Rust Collections Case StudyRust Collections Case Study: BTreeMap Alexis Beingessner This is the third entry in a series on implementing collections in the Rust programming language. The full list of entries can be found...
-
8
Copy link Member m-ou-se commented...
-
7
Copy link Contributor mbrubeck ...
-
10
New issue Stablize {HashMap,BTreeMap}::into_{keys,values} #84328
-
11
Struct std::collections::...
-
41
Deepak Jaiswal September 12, 2021 7 minute read
-
3
Copy link Contributor xu-cheng c...
-
5
Copy link Member Author Nemo157...
-
5
Tracking Issue for Result::into_ok_or_err / feature(result_into_ok_or_err) #82223 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK