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) {
// ..
}
}
Metadata
Metadata
Assignees
Labels
Area: `std::io`, `std::fs`, `std::net` and `std::path`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.