-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(deque_extend_front)]
This is a tracking issue for 5 new methods on VecDeque
similar to ones already on Vec
or their counterparts that push to the front instead of back.
Public API
// alloc::collections::vec_deque
impl<T> VecDeque<T> {
// Preserves order of elements.
pub fn prepend<I>(&mut self, other: I)
where
I: IntoIterator<Item = T>,
I::Iter: DoubleEndedIterator
{
self.extend_front(other.into_iter().rev())
}
// Reverses order of elements.
pub fn extend_front<I>(&mut self, other: I)
where
I: IntoIterator<Item = T>;
pub fn splice<R, I>(&mut self, range: R, replace_with: I) -> Splice<'_, I::IntoIter, A>
where
R: RangeBounds<usize>,
I: IntoIterator<Item = T>;
}
impl<T: Clone> VecDeque<T> {
pub fn extend_from_within<R>(&mut self, src: R)
where
R: RangeBounds<usize>;
// Preserves order of elements.
pub fn prepend_from_within<R>(&mut self, src: R)
where
R: RangeBounds<usize>;
}
Steps / History
(Remember to update the S-tracking-*
label when checking boxes.)
- Implementation:
- extend_front, prepend: add extend_front to VecDeque with specialization like extend (unfinished) #146861
- extend_from_within, prepend_from_within: implement VecDeque extend_from_within and prepend_from_within #147161
- splice: TODO
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Footnotes
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.