-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
This is a tracking issue for IoSlice::{advance, advance_slices}
and IoSliceMut::{advance, advance_slices}
.
Feature gate: #![feature(io_slice_advance)].
Steps:
- Implement the RFC.
- FCP
- Stabilization PR.
Current API additions:
impl<'a> IoSlice<'a> { // And `IoSliceMut`
pub fn advance(&mut self, n: usize);
pub fn advance_slices(bufs: &mut &mut [IoSlice<'a>], n: usize);
}
Old issue:
Writing rust-lang/futures-rs#1741 I needed to resort to unsafe code to change the underlying slice in IoSlice
(and IoSliceMut
). I'm missing a method that can change the underlying slice. @Nemo157 said that I should open an issue.
Current idea would be something like Buf::advance
from the bytes crate.
impl IoSlice {
// Advance the internal cursors of the slice by `n` bytes.
fn advance(&mut self, n: usize) {
// ..
}
}
thomaseizinger, Ten0 and InsertCreativityHere
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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 RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.