Closed
Description
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
- Requested in Add
into_keys
andinto_values
to associative maps #55214. - Implementation: Implement
into_keys
andinto_values
for associative maps #75163 - Final commenting period (FCP)
- Stabilization PR: Stablize {HashMap,BTreeMap}::into_{keys,values} #84328
Unresolved Questions
- None yet.
Metadata
Metadata
Assignees
Labels
Area: `std::collections`Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.